[PATCH, FORTRAN] ICE in gfc_conv_array_constructor_expr PR93497

Mark Eggleston mark.eggleston@codethink.co.uk
Tue May 12 15:08:04 GMT 2020


Please find attached for PR93497. This patch was posted as a comment to 
the PR, I've checked it added a test case. It has the side affect of 
changing the errors for three other test cases which have modified 
accordingly.

The commit message is as follows:

fortran : ICE in gfc_conv_array_constructor_expr PR93497

Invalid expressions, such as those involving array constructors,
used for the length of character types will cause an ICE.

2020-05-12  Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/

     PR fortran/93497
     * decl.c (char_len_param_value) : Check whether character
     length expression is of type EXPR_OP and if so simplify it.
     * resolve.c (resolve_charlen) : Reject length if it has a
     rank.

2020-05-12  Mark Eggleston <markeggleston@gcc.gnu.org>

gcc/testsuite/

     PR fortran/93497
     * gfortran.dg/pr88025.f90: Change in wording of error.
     * gfortran.dg/pr93497.f90: New test.
     * gfortran.dg/pr93714_1.f90: Change in wording of errors.
     * gfortran.dg/pr93714_2.f90: Change in wording of errors.

Note: the dates will be updated as necessary when the patch is committed.

Tested using make check-fortran on x86_64 for branches master, 
releases/gcc-8, releases/gcc-9 and releases/gcc-10.

OK to commit to master and to backport to releases/gcc-8, releases/gcc-9 
and releases/gcc-10?

-- 
https://www.codethink.co.uk/privacy.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR93497.patch
Type: text/x-patch
Size: 4652 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200512/1a884e9d/attachment.bin>


More information about the Gcc-patches mailing list