https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64068
--- Comment #2 from Dmitry G. Dyachenko <dimhen at gmail dot com> --- another testcase $ /usr/local/gcc_current/bin/g++ -fpreprocessed -c -O2 x.ii x.ii:46:19: internal compiler error: in remove_unreachable_nodes, at ipa.c:546 void fn4() { B(); } ^ 0xb14713 symbol_table::remove_unreachable_nodes(bool, _IO_FILE*) /home/dimhen/src/gcc_current/gcc/ipa.c:546 0x189e60c ipa_inline /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2193 0x189e60c execute /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2558 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. $ cat x.ii typedef int PROV_ENUMALGS_EX, PCCRYPT_OID_INFO; class A { int m_fn2(); virtual bool m_fn1(PCCRYPT_OID_INFO); }; int fn1(); void fn2(); int A::m_fn2() { m_fn1(0); } bool fn3() { for (;;) { if (fn1()) { if (fn1() != 259) fn2(); break; } return 1; } return 0; } class B { public: B() { fn3(); } }; class C : A { bool m_fn1(PCCRYPT_OID_INFO) { m_fn3(); } int isSupportedByProvider_algId; PROV_ENUMALGS_EX isSupportedByProvider_outEnumAlgs; PROV_ENUMALGS_EX isSupportedByProvider_enumAlgs; bool m_fn3() { while (1) { if (fn1()) { if (fn1() != 259) fn2(); break; } if (isSupportedByProvider_algId) isSupportedByProvider_outEnumAlgs = isSupportedByProvider_enumAlgs; return 1; } return 0; } }; void fn4() { B(); }