[Bug fortran/23232] New: DATA implied DO variables
rofi at ya dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 4 15:58:00 GMT 2005
gcc version 4.1.0 20050730 (experimental)
The following two DATA statements are rejected by gfortran because "J" is not
considered a valid primary in those expressions although it is the variable of
another enclosing data-implied-do.
PROGRAM p
REAL :: ONE_ARRAY(100, 100)
INTEGER :: K, J
DATA ((ONE_ARRAY (K, J), K = 1, J-1), J = 1, 100) /4950 * 1.0/
DATA ((ONE_ARRAY (K, J), K = J, 100), J = 1, 100) /5050 * 0.0/
END PROGRAM
$ gfortran -fsyntax-only snippet.f90
In file snippet.f90:5
DATA ((ONE_ARRAY (K, J), K = 1, J-1), J = 1, 100) /4950 * 1.0/
1
Error: Variable 'j' at (1) cannot appear in an initialization expression
In file snippet.f90:6
DATA ((ONE_ARRAY (K, J), K = J, 100), J = 1, 100) /5050 * 0.0/
1
Error: Variable 'j' at (1) cannot appear in an initialization expression
--
Summary: DATA implied DO variables
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rofi at ya dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23232
More information about the Gcc-bugs
mailing list