--------------------------------- program test implicit none
integer, dimension( 3 ), parameter :: tgc = (/5, 6, 7 /) type tgccomp integer, dimension( tgc( 1 ) : tgc( 2 ) ) :: tgclist end type tgccomp end program --------------------------------- This gives the following error: gfortran test.f90 test.f90:8.73: integer, dimension( tgc( 1 ) : tgc( 2 ) ) :: tgclist 1 Error: Component 'tgclist' of 'tgccomp' at (1) must have constant array bounds This works: --------------------------------- type tgccomp integer, dimension( 1 : tgc( 1 ) ) :: tgclist end type tgccomp --------------------------------- -- Summary: gfortran does not recognize constant array bounds in dimension attribute of type component Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: flad at gmx dot at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824