if (array_elt_type)
{
+ /* Do not use bitsizetype for ARRAY_REF indices. */
+ if (TYPE_DOMAIN (TREE_TYPE (object)))
+ purpose = fold_convert (TREE_TYPE (TYPE_DOMAIN (TREE_TYPE (object))),
+ purpose);
cref = build4 (ARRAY_REF, array_elt_type, unshare_expr (object),
purpose, NULL_TREE, NULL_TREE);
}
else
var = decl;
+ /* If OMP_FOR is re-gimplified, ensure all variables in pre-body
+ are noticed. */
+ gimplify_stmt (&OMP_FOR_PRE_BODY (for_stmt));
+
ret |= gimplify_expr (&GENERIC_TREE_OPERAND (t, 1),
&OMP_FOR_PRE_BODY (for_stmt),
NULL, is_gimple_val, fb_rvalue);
pop_gimplify_context (NULL);
+ if (*stmts && gimple_in_ssa_p (cfun))
+ {
+ tree_stmt_iterator tsi;
+
+ for (tsi = tsi_start (*stmts); !tsi_end_p (tsi); tsi_next (&tsi))
+ mark_symbols_for_renaming (tsi_stmt (tsi));
+ }
+
return expr;
}
expr = force_gimple_operand (expr, &stmts, simple_p, var);
if (stmts)
{
- if (gimple_in_ssa_p (cfun))
- {
- tree_stmt_iterator tsi;
-
- for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
- mark_symbols_for_renaming (tsi_stmt (tsi));
- }
-
if (before)
bsi_insert_before (bsi, stmts, m);
else