diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/primary.c | 21 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 |
3 files changed, 15 insertions, 17 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 275acaf..294fc66 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/66094 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"); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 60d9412..4fb8cca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr> + + PR fortran/68283 + gfortran.dg/pr68283.f90: New test. + 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/66094 |