aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c6
1 files changed, 5 insertions, 1 deletions
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)