On 09/03/14 02:45, Martin Jambor wrote:
Hi,
I did not think it was possible, but it can happen that when
duplicate_thunk_for_node creates a duplicate of a thunk which
previously expand_thunk left alone to be expanded into assembly by the
back end, the newly created thunk does get expanded by expand_thunk.
When this happens, we end up with an un-analyzed node which triggers
an assert later on.
This patch deals with the situation by analyzing the newly expanded
thunk. This revealed that DECL_ARGUMENTS were insufficiently copied
for the new decl and it was sharing them with the old one. So this
patch fixes this as well.
Bootstrapped and tested on x86_64-linux and i686-linux (where the bug
triggered), OK for trunk and the 4.9 branch?
Thanks,
Martin
2014-09-01 Martin Jambor <mjam...@suse.cz>
PR ipa/61654
* cgraphclones.c (duplicate_thunk_for_node): Copy arguments of the
new decl properly. Analyze the new thunk if it is expanded.
gcc/testsuite/
* g++.dg/ipa/pr61654.C: New test.
OK.
Jeff