Created attachment 32748 [details] reduced testcase Output: $ g++ -O2 -fno-early-inlining testcase.C $ ./a.out Aborted $ g++ -O2 -fno-early-inlining testcase.C -fno-devirtualize $ ./a.out (no output) Tested revisions: r210047 - fail 4.9 r209651 - fail 4.8 r209342 - OK 4.7 r209345 - OK
Confirmed.
Started with r202036.
Mine
I have proposed a fix on the mailing list: https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01199.html
Author: jamborm Date: Thu May 15 15:04:18 2014 New Revision: 210477 URL: http://gcc.gnu.org/viewcvs?rev=210477&root=gcc&view=rev Log: 2014-05-15 Martin Jambor <mjambor@suse.cz> PR ipa/61085 * ipa-prop.c (update_indirect_edges_after_inlining): Check type_preserved flag when the indirect edge is polymorphic. testsuite/ * g++.dg/ipa/pr61085.C: New test. Added: trunk/gcc/testsuite/g++.dg/ipa/pr61085.C Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-prop.c trunk/gcc/testsuite/ChangeLog
Author: jamborm Date: Thu May 15 15:10:58 2014 New Revision: 210478 URL: http://gcc.gnu.org/viewcvs?rev=210478&root=gcc&view=rev Log: 2014-05-15 Martin Jambor <mjambor@suse.cz> PR ipa/61085 * ipa-prop.c (update_indirect_edges_after_inlining): Check type_preserved flag when the indirect edge is polymorphic. testsuite/ * g++.dg/ipa/pr61085.C: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/g++.dg/ipa/pr61085.C Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ipa-prop.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
Fixed.
The testcase fails at -Os @ r212580: $ g++ -Os pr61085.ii $ ./a.out Aborted
Can you open a new bug for that?
(In reply to Richard Biener from comment #9) > Can you open a new bug for that? Opened PR61884 for that.