This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29267] different length non-constant strings in array constructors ICE
- From: "tobias dot burnus at physik dot fu-berlin dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2006 13:09:26 -0000
- Subject: [Bug fortran/29267] different length non-constant strings in array constructors ICE
- References: <bug-29267-6552@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from tobias dot burnus at physik dot fu-berlin dot de 2006-10-28 13:09 -------
> Do g95 and ifort also compile the original testcase and do The Right Thing?
No. g95 has a run-time error, ifort garbage at the beginning (but no crash);
f95 and sunf95 don't compile.
gfortran: ICE for "x", for "x ": compiles, but garbage (extra 1.000) at run
time, for "x"//31characters: ok like all the other compilers
> g95 ice29267.f90
> ./a.out
Fortran runtime error: Inconsistent string size in array constructor
> ifort ice4.f90
> ./a.out # with print *, a:
xw~D#�*'@x$�
1.000
NAGf95:
Array constructor values have differing CHARACTER lengths (1 and 32)
sunf95:
Line = 3, Column = 23: ERROR: Array constructor values of type character must
all have the same length.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267