[Bug fortran/29267] different length non-constant strings in array constructors ICE

2007-12-07 Thread burnus at gcc dot gnu dot org


--- Comment #16 from burnus at gcc dot gnu dot org  2007-12-07 22:43 ---
 Btw, the original testcase started compiling on mainline between 2007-07-16 
 and
 2007-08-15. It now compiles and runs without error.

Cool. And for -std=f95/f2003 the invalid code is rejected.
= CLOSE. I think (hope?) thate the testsuite covers this PR..


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267



[Bug fortran/29267] different length non-constant strings in array constructors ICE

2007-12-07 Thread reichelt at gcc dot gnu dot org


--- Comment #15 from reichelt at gcc dot gnu dot org  2007-12-07 22:12 
---
Btw, the original testcase started compiling on mainline between 2007-07-16 and
2007-08-15. It now compiles and runs without error.


-- 

reichelt at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||reichelt at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267



[Bug fortran/29267] different length non-constant strings in array constructors ICE

2006-10-28 Thread tobias dot burnus at physik dot fu-berlin dot de


--- 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##65533;*'@x$#65533;
  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



[Bug fortran/29267] different length non-constant strings in array constructors ICE

2006-10-27 Thread tobi at gcc dot gnu dot org


--- Comment #13 from tobi at gcc dot gnu dot org  2006-10-27 13:33 ---
Thanks for the pointer to the other PR.  Do g95 and ifort also compile the
original testcase and do The Right Thing?

I didn't have time to fix this after I assigned myself to it, so unassigining.


-- 

tobi at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||27998
 AssignedTo|tobi at gcc dot gnu dot org |unassigned at gcc dot gnu
   ||dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267



[Bug fortran/29267] different length non-constant strings in array constructors ICE

2006-10-26 Thread tobias dot burnus at physik dot fu-berlin dot de


--- Comment #12 from tobias dot burnus at physik dot fu-berlin dot de  
2006-10-26 20:29 ---
  why is there no problem with this code?
 
  PROGRAM test_constructor
CHARACTER(len=32), DIMENSION(1,2)  :: a
a = reshape((/ one arg, another arg /), (/ 1, 2 /))
  END PROGRAM
 
 Because this doesn't trigger the buggy codepath :-) Sometime in the  
 past someone went to some lengths to support this kind of invalid  
 code.  Had they read the standard closely, they could have saved  
 themselves some work.

The question is whether one wants to support such code or not?

NAG f95 gives an error even with -dusty. sunf95 gives an error. g95 and ifort
compile by default, but with -std=f95 / -stand f95 the give an error / warning
(respectively).
gfortran does not give such warning/error.
See also: bug 27998


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267