Hi Harald, Looks Good to Me.

OK

Thanks

On 2/22/21 1:14 PM, Harald Anlauf via Fortran wrote:
Dear all,

when simplifying the RESHAPE intrinsic we lost the string length when
the resulting array had size zero.  The attached patch sets the resulting
length from the source.

Regtested on x86_64-pc-linux-gnu.  OK for mainline?

Thanks,
Harald


PR fortran/99206 - ICE in add_init_expr_to_sym, at fortran/decl.c:1980

Make sure that the string length is properly set during simplification
even when the resulting array is zero-sized.

gcc/fortran/ChangeLog:

        PR fortran/99206
        * simplify.c (gfc_simplify_reshape): Set string length for
        character arguments.

gcc/testsuite/ChangeLog:

        PR fortran/99206
        * gfortran.dg/reshape_zerosize_4.f90: New test.


Reply via email to