This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]