diff --git a/trans-array.c b/trans-array.c index 78e1443..427bb7b 100644 --- a/trans-array.c +++ b/trans-array.c @@ -463,7 +463,7 @@ void gfc_mark_ss_chain_used (gfc_ss * ss, unsigned flags) { for (; ss != gfc_ss_terminator; ss = ss->next) - ss->useflags = flags; + ss->info->useflags = flags; } static void gfc_free_ss (gfc_ss *); @@ -2906,7 +2906,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag, { ss_info = ss->info; - if ((ss->useflags & flag) == 0) + if ((ss_info->useflags & flag) == 0) continue; ss_type = ss_info->type; @@ -3148,7 +3148,7 @@ gfc_trans_scalarizing_loops (gfc_loopinfo * loop, stmtblock_t * body) /* Clear all the used flags. */ for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) - ss->useflags = 0; + ss->info->useflags = 0; } @@ -3185,7 +3185,7 @@ gfc_trans_scalarized_loop_boundary (gfc_loopinfo * loop, stmtblock_t * body) ss_info = ss->info; - if ((ss->useflags & 2) == 0) + if ((ss_info->useflags & 2) == 0) continue; ss_type = ss_info->type; diff --git a/trans-expr.c b/trans-expr.c index b175b62..01d4ca3 100644 --- a/trans-expr.c +++ b/trans-expr.c @@ -2898,7 +2898,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, if (!sym->attr.elemental) { gcc_assert (se->ss->info->type == GFC_SS_FUNCTION); - if (se->ss->useflags) + if (se->ss->info->useflags) { gcc_assert ((!comp && gfc_return_by_reference (sym) && sym->result->attr.dimension) @@ -2983,7 +2983,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, gfc_init_se (&parmse, se); gfc_conv_derived_to_class (&parmse, e, fsym->ts); } - else if (se->ss && se->ss->useflags) + else if (se->ss && se->ss->info->useflags) { /* An elemental function inside a scalarized loop. */ gfc_init_se (&parmse, se); diff --git a/trans-intrinsic.c b/trans-intrinsic.c index a3b7383..fcc59d7 100644 --- a/trans-intrinsic.c +++ b/trans-intrinsic.c @@ -6634,7 +6634,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) break; case GFC_ISYM_TRANSFER: - if (se->ss && se->ss->useflags) + if (se->ss && se->ss->info->useflags) /* Access the previously obtained result. */ gfc_conv_tmp_array_ref (se); else diff --git a/trans.h b/trans.h index e74da41..907c271 100644 --- a/trans.h +++ b/trans.h @@ -209,6 +209,11 @@ typedef struct gfc_ss_info gfc_array_info array; } data; + + /* This is used by assignments requiring temporaries. The bits specify which + loops the terms appear in. This will be 1 for the RHS expressions, + 2 for the LHS expressions, and 3(=1|2) for the temporary. */ + unsigned useflags:2; } gfc_ss_info; @@ -237,11 +242,9 @@ typedef struct gfc_ss struct gfc_ss *loop_chain; struct gfc_ss *next; - /* This is used by assignments requiring temporaries. The bits specify which - loops the terms appear in. This will be 1 for the RHS expressions, - 2 for the LHS expressions, and 3(=1|2) for the temporary. The bit - 'where' suppresses precalculation of scalars in WHERE assignments. */ - unsigned useflags:2, where:1, is_alloc_lhs:1; + /* The bit 'where' suppresses precalculation of scalars in WHERE assignments. + */ + unsigned where:1, is_alloc_lhs:1; } gfc_ss; #define gfc_get_ss() XCNEW (gfc_ss)