User account creation filtered due to spam.

Bug 29142 - gfortran - incorrectly flags error on allocatable variable in TYPE declaration
Summary: gfortran - incorrectly flags error on allocatable variable in TYPE declaration
Status: RESOLVED DUPLICATE of bug 20541
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2006-09-19 14:43 UTC by Dale Ranta
Modified: 2006-09-19 16:41 UTC (History)
7 users (show)

See Also:
Host: Darwin 8.7.0
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Dale Ranta 2006-09-19 14:43:33 UTC
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
Error: Attribute at (1) is not allowed in a TYPE definition
 In file struct02.f90:6

 end type SDS2Dout
Error: Derived type definition at (1) has no components
[dranta:~/tests/gfortran-D] dir% cat struct02.f90
      module plot_hdf
      implicit none
        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)
Comment 1 Andrew Pinski 2006-09-19 16:41:11 UTC
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 ***