http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59226
Bug ID: 59226 Summary: [4.9 Regression] ICE: in record_target_from_binfo, at ipa-devirt.c:661 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: octoploid at yandex dot com More outfall from r205019: markus@x4 tmp % cat test.ii class A { virtual void m_fn1(); }; class B; class C : A { public: virtual B *m_fn2(); }; class D : virtual C, A {}; class B { public: int m_fn1(); }; class F : virtual public C {}; class G : F, D { virtual void m_fn6(); }; F *a; int b = a->m_fn2()->m_fn1(); G c; markus@x4 tmp % g++ -c -O2 test.ii test.ii:9:7: warning: direct base āAā inaccessible in āDā due to ambiguity [enabled by default] class D : virtual C, A {}; ^ test.ii:20:4: internal compiler error: in record_target_from_binfo, at ipa-devirt.c:661 G c; ^ 0x9bad92 record_target_from_binfo ../../gcc/gcc/ipa-devirt.c:661 0x9bab0b record_target_from_binfo ../../gcc/gcc/ipa-devirt.c:681 0x9bab0b record_target_from_binfo ../../gcc/gcc/ipa-devirt.c:681 0x9baf30 possible_polymorphic_call_targets_1 ../../gcc/gcc/ipa-devirt.c:705 0x9baf84 possible_polymorphic_call_targets_1 ../../gcc/gcc/ipa-devirt.c:711 0x9bd7a2 possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**) ../../gcc/gcc/ipa-devirt.c:1292 0x9e2145 possible_polymorphic_call_targets ../../gcc/gcc/ipa-utils.h:114 0x9e2145 walk_polymorphic_call_targets ../../gcc/gcc/ipa.c:175 0x9e2145 symtab_remove_unreachable_nodes(bool, _IO_FILE*) ../../gcc/gcc/ipa.c:398 0xa8a9b7 execute_todo ../../gcc/gcc/passes.c:1884 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.