The other compilers are happy with this TYPE declaration - so I guess that it is ok -
[dranta:~/tests/gfortran-D] dir% g95 -c struct02.f90 [dranta:~/tests/gfortran-D] dir% f90 -c struct02.f90 [dranta:~/tests/gfortran-D] dir% xlf95 -qsuffix=f=f90 -c struct02.f90 ** plot_hdf === End of Compilation 1 === 1501-510 Compilation successful for file struct02.f90. [dranta:~/tests/gfortran-D] dir% gfortran -c struct02.f90 In file struct02.f90:5 real, dimension(:), allocatable :: data 1 Error: Attribute at (1) is not allowed in a TYPE definition In file struct02.f90:6 end type SDS2Dout 1 Error: Derived type definition at (1) has no components [dranta:~/tests/gfortran-D] dir% cat struct02.f90 module plot_hdf implicit none save type, public :: SDS2Dout real, dimension(:), allocatable :: data end type SDS2Dout end module plot_hdf [dranta:~/tests/gfortran-D] dir% gfortran --v Using built-in specs. Target: powerpc-apple-darwin8.7.0 Configured with: ../gcc/configure --prefix=/usr/local/gfortran --enable-languages=c,f95 Thread model: posix gcc version 4.2.0 20060919 (experimental) -- Summary: gfortran - incorrectly flags error on allocatable variable in TYPE declaration Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov GCC host triplet: Darwin 8.7.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29142