diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c3c4f18..29504c8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org> + Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/80118 + * expr.c (gfc_get_full_arrayspec_from_expr): If there is + no symtree, set array spec to NULL. + 2017-09-23 Janus Weil <janus@gcc.gnu.org> PR fortran/82143 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 87ea09f..bfbb19e 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4568,7 +4568,11 @@ gfc_get_full_arrayspec_from_expr (gfc_expr *expr) if (expr->expr_type == EXPR_VARIABLE || expr->expr_type == EXPR_CONSTANT) { - as = expr->symtree->n.sym->as; + if (expr->symtree) + as = expr->symtree->n.sym->as; + else + as = NULL; + for (ref = expr->ref; ref; ref = ref->next) { switch (ref->type) |