bug - constant data cannot be declared in a host subprogram

The documents written that constant data can be used in declaration statements.
However, I only be able to define it in the module’s area before the CONTAINS statement. Is this the bug?

MODULE themodule
   real, constant :: var1  ! this is okay
CONTAINS
   subroutine dosomething()
      real, constant :: var2 ! this is error
   end subroutine dosomething
END MODULE

Tuan

Hi Tuan,

Most likely, but I’ll let our engineers investigate. I saw that you had sent this to PGI Customer Service as well and that they have opened TPR#16605.

Thanks,
Mat

Thanks Mat. Sorry for duplicating. I didn’t received any feedback from PGI Customer service, so I thought I can reach you faster via the forum.

Tuan.