diff options
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r-- | gcc/fortran/trans-const.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index 5fbe765..84a8339 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -358,6 +358,8 @@ gfc_conv_constant_to_tree (gfc_expr * expr) void gfc_conv_constant (gfc_se * se, gfc_expr * expr) { + gfc_ss *ss; + /* We may be receiving an expression for C_NULL_PTR or C_NULL_FUNPTR. If so, the expr_type will not yet be an EXPR_CONSTANT. We need to make it so here. */ @@ -380,10 +382,11 @@ gfc_conv_constant (gfc_se * se, gfc_expr * expr) return; } - if (se->ss != NULL) + ss = se->ss; + if (ss != NULL) { - gcc_assert (se->ss != gfc_ss_terminator); - gcc_assert (se->ss->type == GFC_SS_SCALAR); + gcc_assert (ss != gfc_ss_terminator); + gcc_assert (ss->info->type == GFC_SS_SCALAR); gcc_assert (se->ss->expr == expr); se->expr = se->ss->data.scalar.expr; |