diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-01-17 21:40:46 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-01-17 20:40:46 +0000 |
commit | a99670f923dec07fe1b2813419f33e0cd18e091e (patch) | |
tree | 7639a782b167f2ec0ee7b30446cf912d8a1e8821 /gcc/ipa-inline.c | |
parent | 8fca809b59757519517e67a23b6df005e9e452dd (diff) | |
download | gcc-a99670f923dec07fe1b2813419f33e0cd18e091e.zip gcc-a99670f923dec07fe1b2813419f33e0cd18e091e.tar.gz gcc-a99670f923dec07fe1b2813419f33e0cd18e091e.tar.bz2 |
re PR ipa/83051 (ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024)
PR ipa/83051
* ipa-inline.c (flatten_function): Do not overwrite final inlining
failure.
* gcc.c-torture/compile/pr83051-2.c: New testcase.
From-SVN: r256818
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 145ffbb..4a7181e 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2083,7 +2083,8 @@ flatten_function (struct cgraph_node *node, bool early) "Not inlining %s into %s to avoid cycle.\n", xstrdup_for_dump (callee->name ()), xstrdup_for_dump (e->caller->name ())); - e->inline_failed = CIF_RECURSIVE_INLINING; + if (cgraph_inline_failed_type (e->inline_failed) != CIF_FINAL_ERROR) + e->inline_failed = CIF_RECURSIVE_INLINING; continue; } |