On Sun, Mar 14, 2021 at 08:22:58AM -0700, Jerry DeLisle wrote: > > > > > > > > FAIL: gfortran.dg/pr87907.f90 -O (internal compiler error) > > > > FAIL: gfortran.dg/pr87907.f90 -O (test for excess errors) > > > > FAIL: gfortran.dg/pr96013.f90 -O (test for excess errors) > > > > FAIL: gfortran.dg/pr96025.f90 -O (internal compiler error) > > > > FAIL: gfortran.dg/pr96025.f90 -O (test for errors, line 5) > > > > FAIL: gfortran.dg/pr96025.f90 -O (test for excess errors) > > >
No idea why I don't see the above. This patch on top of the previous patch might fix the last 3 FAILs. (Watch for copy-n-paste whitespace corruption.) diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index e1acc2db000..081487a45e6 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3476,7 +3476,6 @@ gfc_specification_expr (gfc_expr *e) { gfc_error ("Expression at %L must be of INTEGER type, found %s", &e->where, gfc_basic_typename (e->ts.type)); - gfc_clear_ts (&e->ts); return false; } @@ -5246,11 +5245,12 @@ gfc_traverse_expr (gfc_expr *expr, gfc_symbol *sym, if ((*func) (expr, sym, &f)) return true; - if (expr->ts.type == BT_CHARACTER - && expr->ts.u.cl - && expr->ts.u.cl->length - && expr->ts.u.cl->length->expr_type != EXPR_CONSTANT - && gfc_traverse_expr (expr->ts.u.cl->length, sym, func, f)) + if (expr->expr_type != EXPR_CONSTANT + && expr->ts.type == BT_CHARACTER + && expr->ts.u.cl + && expr->ts.u.cl->length + && expr->ts.u.cl->length->expr_type != EXPR_CONSTANT + && gfc_traverse_expr (expr->ts.u.cl->length, sym, func, f)) return true; switch (expr->expr_type) -- steve