[patch, fortran] Fix type conversion in large array constructors with iterators

Thomas König tk@tkoenig.net
Sun Mar 18 23:02:00 GMT 2018


Hello world,

the attached patch fixes the bug that Steve found; the patch itself
simply makes sure to copy a constructor instead of only the value
of the constructor when converting types.

Regressoin-tested. OK for trunk?

Maybe this is also a candidate for gcc-7, because of the silent
wrong-code issue.

Regards

	Thomas

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

         PR fortran/84931
         * simplify.c (gfc_convert_constant): Correctly handle iterators
         for type conversion.

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

         PR fortran/84931
         * gfortran.dg/array_constructor_52.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2.diff
Type: text/x-patch
Size: 1204 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180318/a2e8686f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array_constructor_52.f90
Type: text/x-fortran
Size: 280 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180318/a2e8686f/attachment-0001.bin>


More information about the Gcc-patches mailing list