]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ipa-inline-transform.c
Fix g++.dg/torture/pr59226.C
authorJan Hubicka <hubicka@ucw.cz>
Thu, 5 Dec 2019 20:53:39 +0000 (21:53 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 5 Dec 2019 20:53:39 +0000 (20:53 +0000)
commita414fd426346558d7a913af3ed82bcc1121fc880
treead5a3edff5a4f5544f7171ff5f7da8a21c5467b4
parent7906797ebec6881d7d90165340f51efcf447d716
Fix g++.dg/torture/pr59226.C

this patch fixes ICE in g++.dg/torture/pr59226.C which was triggered by
new comdat_local sanity check.  What happens here is that function gets
inlined into its own thunk which makes it !comdat_local_p but the updating
code does not notice since thunk calls comdat local alias of the function
itself and we look at alias target rather than original callee.

This also shows that we miss optimization here.  Currently we will not inline
thunk out of its comdat local group w/o inlining function it is associated with
into it.

We should teach inline_call to reoslve edges to aliases while inlining and
relax calls_comdat_local flag.  But this needs bit more work, so I fix the
ICE first.

* ipa-inline-transform.c (inline_call): Fix maintenatnce of comdat_local

From-SVN: r279021
gcc/ChangeLog
gcc/ipa-inline-transform.c