https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94397
--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Mon, Mar 30, 2020 at 04:23:11PM +0000, kargl at gcc dot gnu.org wrote: > > --- Comment #2 from kargl at gcc dot gnu.org --- > (In reply to Martin Liška from comment #1) > > Confirmed, started with r10-7369-gc38daa7976886a59. > > Patch in the linked git revision appears to expose a latent > bug in TYPE IS(). Two workarounds are to use either > > type is (real(4)) ! Bad, because of hard coded kind parameter > > or > > integer, parameter :: sp = kind(1.) > ... > type is (real(sp)) > Untested patch against svn reverion 280157. Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 280157) +++ gcc/fortran/match.c (working copy) @@ -2239,7 +2239,8 @@ found: a scalar integer initialization-expr and valid kind parameter. */ if (c == ')') { - if (e->ts.type != BT_INTEGER || e->rank > 0) + if (!gfc_reduce_init_expr (e) + || e->ts.type != BT_INTEGER || e->rank > 0) { gfc_free_expr (e); return MATCH_NO;