diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-09-08 15:09:38 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-09-08 15:09:38 +0200 |
commit | 868141900a1c1c7a76c5a48625dbfa1e81d8051c (patch) | |
tree | f04b056a88255c575796a452750ba92f920e65c7 /gcc/ipa-split.c | |
parent | 996e1de5e6bced0c6b6b0cbacee11ccc720ccdf4 (diff) | |
download | gcc-868141900a1c1c7a76c5a48625dbfa1e81d8051c.zip gcc-868141900a1c1c7a76c5a48625dbfa1e81d8051c.tar.gz gcc-868141900a1c1c7a76c5a48625dbfa1e81d8051c.tar.bz2 |
re PR tree-optimization/50287 (FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c compilation, -O2 -flto)
2011-09-08 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/50287
* ipa-split.c (split_function): Do not create SSA names for
non-gimple-registers.
* testsuite/gcc.dg/torture/pr50287.c: New test.
From-SVN: r178688
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index d5e5c69..b16cfb3 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -985,15 +985,20 @@ split_function (struct split_point *split_point) bitmap_set_bit (args_to_skip, num); else { - arg = gimple_default_def (cfun, parm); - if (!arg) + /* This parm might not have been used up to now, but is going to be + used, hence register it. */ + add_referenced_var (parm); + if (is_gimple_reg (parm)) { - /* This parm wasn't used up to now, but is going to be used, - hence register it. */ - add_referenced_var (parm); - arg = make_ssa_name (parm, gimple_build_nop ()); - set_default_def (parm, arg); + arg = gimple_default_def (cfun, parm); + if (!arg) + { + arg = make_ssa_name (parm, gimple_build_nop ()); + set_default_def (parm, arg); + } } + else + arg = parm; if (TYPE_MAIN_VARIANT (DECL_ARG_TYPE (parm)) != TYPE_MAIN_VARIANT (TREE_TYPE (arg))) |