This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component
- From: "flad at gmx dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2008 15:43:49 -0000
- Subject: [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
---------------------------------
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