[patch, fortran] Fix empty substrings when simplifying

Thomas Koenig tkoenig@netcologne.de
Sat Mar 24 12:46:00 GMT 2018


Hell world,

the attached patch is fairly self-explanatory, it fixes an out-of-memory
condition.

Regression-tested. OK for trunk?

Regards

	Thomas

2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/70068
         * expr.c (find_substring_ref): Change types of start, end
         and length variables to gfc_charlen_t. Set length to zero
         for empty substring.

2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/70068
         * gfortran.dg/substr_7.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180324/fb8e2354/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: substr_7.f90
Type: text/x-fortran
Size: 395 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180324/fb8e2354/attachment-0001.bin>


More information about the Fortran mailing list