mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 08:44:32 +08:00
re PR rtl-optimization/47028 (gcc.dg/tree-ssa/tailrecursion-[57].c FAIL with -foptimize-sibling-calls -fno-forward-propagate -fno-tree-copy-prop -fno-tree-dominator-opts)
PR rtl-optimization/47028 * cfgexpand.c (gimple_expand_cfg): Insert entry edge insertions after parm_birth_insn instead of at the beginning of first bb. * gcc.dg/pr47028.c: New test. From-SVN: r168401
This commit is contained in:
parent
7dfef5845a
commit
bc470c243a
@ -1,3 +1,10 @@
|
||||
2011-01-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/47028
|
||||
* cfgexpand.c (gimple_expand_cfg): Insert entry edge
|
||||
insertions after parm_birth_insn instead of at the beginning
|
||||
of first bb.
|
||||
|
||||
2011-01-02 Mingjie Xing <mingjie.xing@gmail.com>
|
||||
|
||||
* doc/generic.texi: Remove duplicated "@subsubsection Statements".
|
||||
|
@ -4085,7 +4085,19 @@ gimple_expand_cfg (void)
|
||||
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
|
||||
{
|
||||
if (e->insns.r)
|
||||
commit_one_edge_insertion (e);
|
||||
{
|
||||
/* Avoid putting insns before parm_birth_insn. */
|
||||
if (e->src == ENTRY_BLOCK_PTR
|
||||
&& single_succ_p (ENTRY_BLOCK_PTR)
|
||||
&& parm_birth_insn)
|
||||
{
|
||||
rtx insns = e->insns.r;
|
||||
e->insns.r = NULL_RTX;
|
||||
emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
|
||||
}
|
||||
else
|
||||
commit_one_edge_insertion (e);
|
||||
}
|
||||
else
|
||||
ei_next (&ei);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-01-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/47028
|
||||
* gcc.dg/pr47028.c: New test.
|
||||
|
||||
2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/protocol-forward-1.m: Removed TODO.
|
||||
|
19
gcc/testsuite/gcc.dg/pr47028.c
Normal file
19
gcc/testsuite/gcc.dg/pr47028.c
Normal file
@ -0,0 +1,19 @@
|
||||
/* PR rtl-optimization/47028 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O -foptimize-sibling-calls -fno-forward-propagate -fno-tree-copy-prop -fno-tree-dominator-opts" } */
|
||||
|
||||
int
|
||||
fib (int n)
|
||||
{
|
||||
if (n <= 1)
|
||||
return 1;
|
||||
return fib (n - 2) + fib (n - 1);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
if (fib (5) != 8)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user