------- Comment #16 from burnus at gcc dot gnu dot org  2008-04-01 10:17 -------
(In reply to comment #15)
> However, the following program without typespec in the array constructor also
> fails (according to my judging what it should do)

Different compilers give different output for this one, but this is no problem
as the program is invalid. "gfortran -fbounds-check" shows the problem:

Fortran runtime error: Different CHARACTER lengths (4/5) in array constructor

That is the reason why (/ typespec :: element-list /)  is needed. How long
should be each element for  (/ "a", "bb", "ccc" /) ? One, two, three or ...
characters? One could argue that is should match the longest, but this is an
arbitrary choice and makes the run-time array construction slower. Actually,
with the Intel compiler, 's, "test"' and '"test", s' produce different results
;-)


-- 


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

Reply via email to