aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-const.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2011-11-03 21:55:48 +0000
committerMikael Morin <mikael@gcc.gnu.org>2011-11-03 21:55:48 +0000
commitbcc4d4e089f5371278a50f8c8827f00a2523854d (patch)
treeff589a308dabd6bbe950810923c3d1652734af73 /gcc/fortran/trans-const.c
parent08dcec6137f763fee843acaca52cd9ac53312eee (diff)
downloadgcc-bcc4d4e089f5371278a50f8c8827f00a2523854d.zip
gcc-bcc4d4e089f5371278a50f8c8827f00a2523854d.tar.gz
gcc-bcc4d4e089f5371278a50f8c8827f00a2523854d.tar.bz2
trans.h (struct gfc_ss_info): New struct.
* trans.h (struct gfc_ss_info): New struct. (gfc_get_ss_info): New macro. (struct gfc_ss): Move type field to struct gfc_ss_info. Add an info field of type gfc_ss_info. * trans-array.c (free_ss_info): New function. (gfc_free_ss): Call free_ss_info. (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Allocate gfc_ss_info field. (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss, gfc_set_vector_loop_bounds, gfc_add_loop_ss_code, gfc_conv_array_index_offset, gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride, gfc_conv_ss_startstride, gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor, gfc_walk_elemental_function_args): Update references to type. * trans-const.c (gfc_conv_constant): Factor common reference chains and update reference to type. * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1): Update reference to type. (gfc_conv_array_constructor_expr, gfc_conv_expr, gfc_conv_expr_reference): Ditto. Factor common reference chains. * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references to type * trans-stmt.c (gfc_trans_where_assign): Ditto. From-SVN: r180867
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r--gcc/fortran/trans-const.c9
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;