aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index caaee6b..01b7dd2 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1838,6 +1838,10 @@ gfc_get_tree_for_caf_expr (gfc_expr *expr)
"component at %L is not supported", &expr->where);
}
+ /* Make sure the backend_decl is present before accessing it. */
+ if (expr->symtree->n.sym->backend_decl == NULL_TREE)
+ expr->symtree->n.sym->backend_decl
+ = gfc_get_symbol_decl (expr->symtree->n.sym);
caf_decl = expr->symtree->n.sym->backend_decl;
gcc_assert (caf_decl);
if (expr->symtree->n.sym->ts.type == BT_CLASS)