diff options
author | Jan Hubicka <jh@suse.cz> | 2011-08-05 22:20:07 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-08-05 20:20:07 +0000 |
commit | f791d3338777d809968269219240a037fba0a57c (patch) | |
tree | c6b2e7393e5aee06c73560ec4c59d15cc9d835b1 /gcc/ipa-inline.c | |
parent | f93b21e270ba3f0e583593280e5f2a42e0273a92 (diff) | |
download | gcc-f791d3338777d809968269219240a037fba0a57c.zip gcc-f791d3338777d809968269219240a037fba0a57c.tar.gz gcc-f791d3338777d809968269219240a037fba0a57c.tar.bz2 |
re PR tree-optimization/49735 (mips64-elf libgcc build fails with apparently infinite recursion.)
PR middle-end/49735
* gcc.c-torture/compile/pr49735.c: New testcase
* ipa-inline.c (recursive_inlining): Look through aliases.
From-SVN: r177482
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 366fc22..c10a618 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1206,8 +1206,9 @@ recursive_inlining (struct cgraph_edge *edge, depth = 1; for (cnode = curr->caller; cnode->global.inlined_to; cnode = cnode->callers->caller) - if (node->decl == curr->callee->decl) - depth++; + if (node->decl + == cgraph_function_or_thunk_node (curr->callee, NULL)->decl) + depth++; if (!want_inline_self_recursive_call_p (curr, node, false, depth)) continue; |