problem with using structures in f90

I am trying to compile a .f90 script, which works fine in compaq visual fortran. I use lots of structures, defined as (for example)

type hlist
real hgt;
integer height
end type hlist

when I try to compile these, using the command:

pgf90 file file.o

I get the response:

PGF90-S-0310-Illegal statement in the specification part of a MODULE (file.f90: 146)

for every variable which is declared within a module. Does pgf90 not support the use of structures, or do I need to use a special option?


It really helps if you can boil it down to a simple example and post the code. Perhaps the following link is related to your problem. If not, you should at least post the compiler version, platform and if possible code to reproduce it.

Hi Rosie,

Structures are supported so I suspect there is an ordering issue or some other problem. Can you please send the example code to and ask Customer Support to forward it to me? Also, please indicate which version of the compiler you’re using as well as the operating system.


Dear Mat and Christopher

On closer inspection, the problem seems to be to do with having ‘;’ on the end of the line?!?

I will remove all the ';'s and see what happens.

Thanks so much for your quick responses!