diff options
author | Richard Guenther <rguenther@suse.de> | 2009-04-27 15:50:05 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-04-27 15:50:05 +0000 |
commit | c685de4a22030cd5bf773568dd7395d5b428ec3c (patch) | |
tree | d2931efd9d30e36b8c46feb3e2e5369830d7614d /gcc/gimplify.c | |
parent | 952fa153c83cd79d30e67ff3c3c321246f7146cc (diff) | |
download | gcc-c685de4a22030cd5bf773568dd7395d5b428ec3c.zip gcc-c685de4a22030cd5bf773568dd7395d5b428ec3c.tar.gz gcc-c685de4a22030cd5bf773568dd7395d5b428ec3c.tar.bz2 |
re PR c/39928 (gimplify_expr failure)
2009-04-27 Richard Guenther <rguenther@suse.de>
PR middle-end/39928
* gimplify.c (gimplify_expr): If we are required to create
a temporary make sure it ends up as register.
* gcc.c-torture/compile/pr39928-1.c: New testcase.
* gcc.c-torture/compile/pr39928-2.c: Likewise.
From-SVN: r146846
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index f831e47..d886784 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7184,7 +7184,12 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, /* The postqueue might change the value of the expression between the initialization and use of the temporary, so we can't use a formal temp. FIXME do we care? */ - *expr_p = get_initialized_tmp_var (*expr_p, pre_p, post_p); + { + *expr_p = get_initialized_tmp_var (*expr_p, pre_p, post_p); + if (TREE_CODE (TREE_TYPE (*expr_p)) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (*expr_p)) == VECTOR_TYPE) + DECL_GIMPLE_REG_P (*expr_p) = 1; + } else *expr_p = get_formal_tmp_var (*expr_p, pre_p); } |