https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70070
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 --- Comment #10 from kargl at gcc dot gnu.org --- (In reply to kargl from comment #9) > Programs z1.f90, z2.f90, z3.f90, z5.f90 now give the error > > troutmask:sgk[271] gfcx -o z z3.f90 && ./z > a.f90:4:9: > > 4 | data (c(i:i), i=1,999) /999*'c'/ > | 1 > Error: Invalid substring in data-implied-do at (1) in DATA statement > > Oddly, za.f90 compiles because the variable is implicitly defined > to be of type integer. If 'integer i' is added to this case, then > an error is issued. This was actually fixed by ------------------------------------------------------------------------ r257962 | kargl | 2018-02-24 09:22:10 -0800 (Sat, 24 Feb 2018) | 11 lines 2018-02-24 Steven G. Kargl <ka...@gcc.gnu.org> PR fortran/30792 * decl.c (gfc_match_data): Check for invalid substring in data-implied-do 2018-02-24 Steven G. Kargl <ka...@gcc.gnu.org> PR fortran/30792 * gfortran.dg/data_substring.f90: New test. but the check for issuing the error message enforced that the implied-do index must be integer. For za.f90 testcase, the basic type for the implicitly typed 'i' is BT_UNKNOWN. Checking for BT_INTEGER is tto strict. Here a patch against svn r 280157. Whoever decides to commit the patch should probably convert za.f90 to a testcase. Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (revision 280157) +++ gcc/fortran/decl.c (working copy) @@ -657,7 +657,6 @@ gfc_match_data (void) goto cleanup; if (new_data->var->iter.var - && new_data->var->iter.var->ts.type == BT_INTEGER && new_data->var->iter.var->symtree->n.sym->attr.implied_index == 1 && new_data->var->list && new_data->var->list->expr