aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-10-21 17:09:49 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-10-21 17:09:49 +0200
commitf9faea3725f6064ab226f1089d255b4f23bc5bef (patch)
tree04e9663b0c8ababe8c7206a8e8bf8c97a33372b2 /gcc/gimplify.c
parente2ce9e83f737d1360167b010fe66fc50cf045307 (diff)
downloadgcc-f9faea3725f6064ab226f1089d255b4f23bc5bef.zip
gcc-f9faea3725f6064ab226f1089d255b4f23bc5bef.tar.gz
gcc-f9faea3725f6064ab226f1089d255b4f23bc5bef.tar.bz2
gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc.
* gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc. From-SVN: r241407
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 254dc73..d855c67 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1192,21 +1192,24 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
{
if (VAR_P (t)
&& !is_global_var (t)
- && DECL_CONTEXT (t) == current_function_decl
- && !DECL_HARD_REGISTER (t)
- && !TREE_THIS_VOLATILE (t)
- && !DECL_HAS_VALUE_EXPR_P (t)
- /* Only care for variables that have to be in memory. Others
- will be rewritten into SSA names, hence moved to the top-level. */
- && !is_gimple_reg (t)
- && flag_stack_reuse != SR_NONE)
+ && DECL_CONTEXT (t) == current_function_decl)
{
- tree clobber = build_constructor (TREE_TYPE (t), NULL);
- gimple *clobber_stmt;
- TREE_THIS_VOLATILE (clobber) = 1;
- clobber_stmt = gimple_build_assign (t, clobber);
- gimple_set_location (clobber_stmt, end_locus);
- gimplify_seq_add_stmt (&cleanup, clobber_stmt);
+ if (!DECL_HARD_REGISTER (t)
+ && !TREE_THIS_VOLATILE (t)
+ && !DECL_HAS_VALUE_EXPR_P (t)
+ /* Only care for variables that have to be in memory. Others
+ will be rewritten into SSA names, hence moved to the
+ top-level. */
+ && !is_gimple_reg (t)
+ && flag_stack_reuse != SR_NONE)
+ {
+ tree clobber = build_constructor (TREE_TYPE (t), NULL);
+ gimple *clobber_stmt;
+ TREE_THIS_VOLATILE (clobber) = 1;
+ clobber_stmt = gimple_build_assign (t, clobber);
+ gimple_set_location (clobber_stmt, end_locus);
+ gimplify_seq_add_stmt (&cleanup, clobber_stmt);
+ }
if (flag_openacc && oacc_declare_returns != NULL)
{