[Patch, Fortran] PR fortran/35846: ICE on character array constructor

Daniel Kraft d@domob.eu
Sat Sep 20 12:27:00 GMT 2008


Hi,

this is a fix for PR fortran/35846 where character array constructor
ICEd in certain situations because gfc_conv_string_length could be
called with a charlength structure whose length was NULL.  The patch
adds logic to handle this special case.  Some details can be found in
the PR in my last comment.

After fixing the ICE, the problem with the global variables pointed out
broke bounds-checking for the tests, which I fixed by saving & restoring
their values.

No regressions on GNU/Linux-x86-32.  Ok for trunk?  Should I backport it
for 4.3 also or do you think it is too complicated?

BTW, my patch should have not much potential for regressions as the new
code is only executed in places where the code would've ICE'd before; at
least I think so...

Cheers,
Daniel

-- 
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080920/42a63927/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080920/42a63927/attachment-0001.ksh>


More information about the Fortran mailing list