[Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions
Tobias dot Schlueter at physik dot uni-muenchen dot de
gcc-bugzilla@gcc.gnu.org
Tue Apr 20 21:44:00 GMT 2004
SUBROUTINE a(b)
INTEGER :: c = SIZE(b)
REAL :: b(5)
END SUBROUTINE
gives an error when compiled,
[tobi@marktplatz src]$ gcc/build/gcc/f951 < t.f90
Warning: Reading file as free form
.file "<stdin>"
In file :2
INTEGER :: c = SIZE(b)
1
Error: 'array' argument of 'size' intrinsic at (1) must be an array
This is unjustified, I believe, ordering of declarations shouldn't affect the
validity of initializations. ifc compiles this without an error. The relevant
section in the (draft) Fortran 95 standard is 7.1.6.1, no. (7) under
initialization expression.
--
Summary: [gfortran] initialization expressions impose ordering
restrictions
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Tobias dot Schlueter at physik dot uni-muenchen dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15031
More information about the Gcc-bugs
mailing list