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)
This is an extension to both Fortran 90 and Fortran 95. It is part of Fortran 2003 though. Anyways this is a dup of bug 20541. *** This bug has been marked as a duplicate of 20541 ***