re PR fortran/88116 (ICE in gfc_convert_constant(): Unexpected type)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 16 Dec 2018 16:29:43 +0000 (16:29 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 16 Dec 2018 16:29:43 +0000 (16:29 +0000)
commite9b75848c387d7c40ae8099b29f76bf473feb728
tree3324a2d41b9da5469722a0846b912698fac5f58e
parent26ca4e0587542437e2aae4682a63efe50523d738
re PR fortran/88116 (ICE in gfc_convert_constant(): Unexpected type)

2018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88116
PR fortran/88467
* array.c (gfc_match_array_constructor): Check return value of
gfc_convert_type().  Skip constructor elements with BT_UNKNOWN,
which need to go through resolution.
* intrinsic.c (gfc_convert_type_warn): Return early if the types
martch (i.e., no conversion is required).
* simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
and return gfc_bad_expr.

2018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88116
* gfortran.dg/pr88116_1.f90: New test.
* gfortran.dg/pr88116_2.f90: Ditto.

PR fortran/88467
* gfortran.dg/pr88467.f90: New test.

From-SVN: r267189
gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/intrinsic.c
gcc/fortran/simplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr88116_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr88116_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr88467.f90 [new file with mode: 0644]