aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-const.c
diff options
context:
space:
mode:
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-03 21:55:48 +0000
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-03 21:55:48 +0000
commit45f3982640ef8034c09b1f99806122525801e62d (patch)
treeff589a308dabd6bbe950810923c3d1652734af73 /gcc/fortran/trans-const.c
parentf6b46ebcc27964a832aa2bf59be164269b7c9fee (diff)
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180867 138bc75d-0d04-0410-961f-82ee72b054a4
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 5fbe765c493..84a83391097 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;