https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82067
Bug ID: 82067 Summary: G++ has an internal compiler error in possible_polymorphic_call_targets, at ipa-devirt.c:1557 Product: gcc Version: 4.9.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jupitercuso4 at gmail dot com Target Milestone: --- Applied patch from PR60871 but it still fails: $ gcc -v COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/project/usr-tensilica-RHEL5/stools-8.0-2017-06-05/bin/../libexec/gcc/x86_64-pc-linux-gnu/4.9.4/lto-wrapper Target: x86_64-pc-linux-gnu ../gcc-4.9.4/configure --with-checking=release --build=x86_64-pc-linux-gnu -enable-languages=c,c++ --disable-libgcj --prefix=/usr/bin $ g++ -c -O2 -g -MD -Werror -Wno-unused-value -fPIC -Wall -Werror -O3 -fomit-frame-pointer -std=gnu++0x -Wno-non-virtual-dtor -Wno-write-strings -Wno-deprecated -Wno-parentheses -Wno-delete-non-virtual-dtor -Wno-parentheses -Wno-unused-variable test.cpp test.cpp:32:1: internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1557 0x6828cb possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**, int*) ../../gcc-4.9.4/gcc/ipa-devirt.c:1557 0x665cea possible_polymorphic_call_targets(tree_node*, bool*, void**) ../../gcc-4.9.4/gcc/ipa-utils.h:142 0xc87198 gimple_fold_call ../../gcc-4.9.4/gcc/gimple-fold.c:1127 0xc87198 fold_stmt_1 ../../gcc-4.9.4/gcc/gimple-fold.c:1302 0xd909b8 fold_marked_statements ../../gcc-4.9.4/gcc/tree-inline.c:4549 0xd8c2e0 optimize_inline_calls(tree_node*) ../../gcc-4.9.4/gcc/tree-inline.c:4630 0xf48b89 inline_transform(cgraph_node*) ../../gcc-4.9.4/gcc/ipa-inline-transform.c:457 0xd1b58a execute_one_ipa_transform_pass ../../gcc-4.9.4/gcc/passes.c:2066 0xd1b58a execute_all_ipa_transforms() ../../gcc-4.9.4/gcc/passes.c:2107 0xbd8abd expand_function ../../gcc-4.9.4/gcc/cgraphunit.c:1775 0xf99653 expand_all_functions ../../gcc-4.9.4/gcc/cgraphunit.c:1916 0xf99653 compile() ../../gcc-4.9.4/gcc/cgraphunit.c:2260 0xf98f17 finalize_compilation_unit() ../../gcc-4.9.4/gcc/cgraphunit.c:2337 0xb149dd cp_write_global_declarations() ../../gcc-4.9.4/gcc/cp/decl2.c:4647 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.