Illegal use of symbol (KIND parameter)


I am using the 32-bit pgf95 version 2010 on OSX 10.5.8. I noticed a fatal error message when compiling legacy code and was able to simplify the offending code to the following.

$ cat mymod.f90

module whatever
    implicit none
    integer, parameter, private :: wp = kind(0.0d0)

    type unused
        integer :: wp
    end type unused


    subroutine somesub(x)
        real(wp), intent(inout) :: x
        x = 1.0_wp
    end subroutine somesub

end module whatever

Upon compiling I get:

$ pgf95 -c mymod.f90
PGF90-S-0084-Illegal use of symbol wp - KIND parameter (mymod.f90: 13)
  0 inform,   0 warnings,   1 severes, 0 fatal for somesub

Admittedly, it isn’t very smart to have two symbols named wp . But is it wrong? One of them is a member of a derived type.


Hi Dominique,

The code looks ok to me. I’ve sent a report off to our compiler engineers (TPR#16528) and we’ll see what they have to say. Hopefully we can get it fix shortly.

Thanks for the report,

Thanks Mat. What is the easiest way for me to stay updated on this? You gave a reference number. Is there a tracker where I can keep an eye on the status of things?


Hi Dominique,

I do most of the verification once a compiler error has been fixed so usually will update a post once the fix has been released.

If you would like us to contact you directly once a fix is is available, please send a note to PGI Customer Service ( and ask them to add you to the notification list.