mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-07 11:33:45 +08:00
re PR tree-optimization/40570 (ICE with recursion at -O3)
2009-07-30 Martin Jambor <mjambor@suse.cz> PR tree-optimization/40570 * ipa-inline.c (cgraph_decide_inlining): Watch out for dead single use inlining loops. * testsuite/gcc.c-torture/compile/pr40570.c: New test. From-SVN: r150263
This commit is contained in:
parent
4380ae3548
commit
2d4b90b183
@ -1,3 +1,9 @@
|
||||
2009-07-30 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/40570
|
||||
* ipa-inline.c (cgraph_decide_inlining): Watch out for dead single
|
||||
use inlining loops.
|
||||
|
||||
2009-07-30 Razya Ladelsky <razya@il.ibm.com>
|
||||
|
||||
* ssa-loop-manip.c: Include langhooks.h.
|
||||
|
@ -1227,6 +1227,8 @@ cgraph_decide_inlining (void)
|
||||
&& !node->needed
|
||||
&& node->local.inlinable
|
||||
&& node->callers->inline_failed
|
||||
&& node->callers->caller != node
|
||||
&& node->callers->caller->global.inlined_to != node
|
||||
&& !gimple_call_cannot_inline_p (node->callers->call_stmt)
|
||||
&& !DECL_EXTERNAL (node->decl)
|
||||
&& !DECL_COMDAT (node->decl))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-07-30 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/40570
|
||||
* gcc.c-torture/compile/pr40570.c: New test.
|
||||
|
||||
2009-07-29 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/14912
|
||||
|
22
gcc/testsuite/gcc.c-torture/compile/pr40570.c
Normal file
22
gcc/testsuite/gcc.c-torture/compile/pr40570.c
Normal file
@ -0,0 +1,22 @@
|
||||
extern void anything(int);
|
||||
|
||||
static int foo(int i);
|
||||
|
||||
static int bar(int i) { foo(i); }
|
||||
|
||||
extern int j;
|
||||
|
||||
static int foo(int i)
|
||||
{
|
||||
if (j)
|
||||
anything(j);
|
||||
return bar(i);
|
||||
}
|
||||
|
||||
int baz()
|
||||
{
|
||||
foo(0);
|
||||
if (baz())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user