diff options
author | Dominique d'Humieres <dominiq@lps.ens.fr> | 2016-01-24 14:12:44 +0100 |
---|---|---|
committer | Dominique d'Humieres <dominiq@gcc.gnu.org> | 2016-01-24 14:12:44 +0100 |
commit | 16acb1a8c70aed62fb95847244affe15219bad2e (patch) | |
tree | 0468ca271ac47eeb1ae4be201ff4b26b0465c80f /gcc/fortran/primary.c | |
parent | 094773e8cb7d7fbb5e101cfc3270ed5c7eff9d95 (diff) | |
download | gcc-16acb1a8c70aed62fb95847244affe15219bad2e.zip gcc-16acb1a8c70aed62fb95847244affe15219bad2e.tar.gz gcc-16acb1a8c70aed62fb95847244affe15219bad2e.tar.bz2 |
[multiple changes]
2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/68283
* primary.c (gfc_variable_attr): revert revision r221955,
call gfc_internal_error only if there is no error.
2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/68283
gfortran.dg/pr68283.f90: New test.
From-SVN: r232775
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index f42c00c..fb4029c 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2194,7 +2194,7 @@ check_substring: symbol_attribute gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts) { - int dimension, codimension, pointer, allocatable, target, n; + int dimension, codimension, pointer, allocatable, target; symbol_attribute attr; gfc_ref *ref; gfc_symbol *sym; @@ -2253,22 +2253,9 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts) case AR_UNKNOWN: /* If any of start, end or stride is not integer, there will already have been an error issued. */ - for (n = 0; n < ref->u.ar.as->rank; n++) - { - int errors; - gfc_get_errors (NULL, &errors); - if (((ref->u.ar.start[n] - && ref->u.ar.start[n]->ts.type == BT_UNKNOWN) - || - (ref->u.ar.end[n] - && ref->u.ar.end[n]->ts.type == BT_UNKNOWN) - || - (ref->u.ar.stride[n] - && ref->u.ar.stride[n]->ts.type == BT_UNKNOWN)) - && errors > 0) - break; - } - if (n == ref->u.ar.as->rank) + int errors; + gfc_get_errors (NULL, &errors); + if (errors == 0) gfc_internal_error ("gfc_variable_attr(): Bad array reference"); } |