Fortran : ICE in gfc_conv_array_constructor_expr PR93497
authorMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 7 May 2020 07:29:14 +0000 (08:29 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Wed, 13 May 2020 13:51:53 +0000 (14:51 +0100)
commitf9f98e59a7f6663f31b671c44998190079097f97
treec67bd2020046c78302df340b66465d15260407c2
parent6cc6b087c8cdfdf58a4bb166aa53950c4bfdef2d
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-13  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-13  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.
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr88025.f90
gcc/testsuite/gfortran.dg/pr93497.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr93714_1.f90
gcc/testsuite/gfortran.dg/pr93714_2.f90