diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index ef41781..2490f85 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -877,6 +877,12 @@ gfc_match_iterator (gfc_iterator *iter, int init_flag) if (m != MATCH_YES) return MATCH_NO; + if (var->symtree->n.sym->attr.dimension) + { + gfc_error ("Loop variable at %C cannot be an array"); + goto cleanup; + } + /* F2008, C617 & C565. */ if (var->symtree->n.sym->attr.codimension) { |