https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93484
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Mark Eggleston <markeggles...@gcc.gnu.org>: https://gcc.gnu.org/g:c38daa7976886a59a3cd496b5c776d75f3cdb056 commit r10-7369-gc38daa7976886a59a3cd496b5c776d75f3cdb056 Author: Mark Eggleston <markeggles...@gcc.gnu.org> Date: Wed Mar 25 08:33:03 2020 +0000 fortran: ICE using undeclared symbol in array constructor PR93484 Using undeclared symbol k in an expression in the following array constructor results in an ICE: print *, [real(x(k))] If the call to the intrinsic is not in a constructor a no IMPLICIT type error is reported and the ICE does not occur. Matching on an expression instead of an initialisation express an and not converting a MATCH_ERROR return value into MATCH_NO results in the no IMPLICIT error and no ICE. Note: Steven G. Kargl <ka...@gcc.gnu.org> is the author of the changes except for the test cases. gcc/fortran/ChangeLog: PR fortran/93484 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR. gcc/testsuite PR fortran/93484 * gfortran.dg/pr93484_1.f90: New test. * gfortran.dg/pr93484_2.f90: New test.