This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions
- From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Apr 2004 21:27:37 -0000
- Subject: [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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