https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64262
Bug ID: 64262 Summary: [5 Regression] Several LTO failures after r218609 when compiling with -fpic. Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: dominiq at lps dot ens.fr CC: hubicka at gcc dot gnu.org After r218609 the following tests fail when compiled with -fpic, e.g. darwin: FAIL: g++.dg/ipa/pr64059.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/ipa/pr64059.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/ipa/pr64059.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/ipa/pr64059.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/ipa/pr64059.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/ipa/pr64059.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/lto/20081119 cp_lto_20081119_0.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081119 cp_lto_20081119_0.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081119 cp_lto_20081119_0.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) FAIL: g++.dg/lto/20081119 cp_lto_20081119_1.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081119 cp_lto_20081119_1.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081119 cp_lto_20081119_1.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) FAIL: g++.dg/lto/20081211-1 cp_lto_20081211-1_0.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081211-1 cp_lto_20081211-1_0.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error) FAIL: g++.dg/lto/20081211-1 cp_lto_20081211-1_0.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) FAIL: g++.dg/lto/pr45621 cp_lto_pr45621_1.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error) FAIL: g++.dg/lto/pr45621 cp_lto_pr45621_1.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error) FAIL: g++.dg/lto/pr45621 cp_lto_pr45621_1.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) FAIL: g++.dg/lto/pr52605 cp_lto_pr52605_0.o assemble, -flto -g (internal compiler error) FAIL: g++.dg/lto/v1-plugin-api-not-supported cp_lto_v1-plugin-api-not-supported_0.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error) FAIL: g++.dg/lto/v1-plugin-api-not-supported cp_lto_v1-plugin-api-not-supported_0.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error) FAIL: g++.dg/lto/v1-plugin-api-not-supported cp_lto_v1-plugin-api-not-supported_0.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) see https://gcc.gnu.org/ml/gcc-regression/2014-12/msg00350.html. The backtrace is * thread #1: tid = 0x83eeb52, 0x0000000100e6d411 cc1plus`get_binfo_at_offset(tree_node*, long long, tree_node*) [inlined] tree_check(__c=tree_code at scalar(0xffffffffffffffff), __g=<unavailable>, __l=int at scalar(0xffffffffffffffff), __f=<unavailable>, __t=<unavailable>) at tree.h:2763, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100e6d411 cc1plus`get_binfo_at_offset(tree_node*, long long, tree_node*) [inlined] tree_check(__c=tree_code at scalar(0xffffffffffffffff), __g=<unavailable>, __l=int at scalar(0xffffffffffffffff), __f=<unavailable>, __t=<unavailable>) at tree.h:2763 2760 inline tree 2761 tree_check (tree __t, const char *__f, int __l, const char *__g, tree_code __c) 2762 { -> 2763 if (TREE_CODE (__t) != __c) 2764 tree_check_failed (__t, __f, __l, __g, __c, 0); 2765 return __t; 2766 } (lldb) bt * thread #1: tid = 0x83eeb52, 0x0000000100e6d411 cc1plus`get_binfo_at_offset(tree_node*, long long, tree_node*) [inlined] tree_check(__c=tree_code at scalar(0xffffffffffffffff), __g=<unavailable>, __l=int at scalar(0xffffffffffffffff), __f=<unavailable>, __t=<unavailable>) at tree.h:2763, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x0000000100e6d411 cc1plus`get_binfo_at_offset(tree_node*, long long, tree_node*) [inlined] tree_check(__c=tree_code at scalar(0xffffffffffffffff), __g=<unavailable>, __l=int at scalar(0xffffffffffffffff), __f=<unavailable>, __t=<unavailable>) at tree.h:2763 frame #1: 0x0000000100e6d411 cc1plus`get_binfo_at_offset(binfo=0x0000000000000000, offset=0, expected_type=0x0000000142774348) + 17 frame #2: 0x0000000100961eba cc1plus`possible_polymorphic_call_targets(otr_type=0x0000000142774348, otr_token=2, context=ipa_polymorphic_call_context at 0x00007fff5fbfefc0, completep=<unavailable>, cache_token=<unavailable>, speculative=<unavailable>) + 2906 at ipa-devirt.c:2404 frame #3: 0x0000000100a34dca cc1plus`compute_ltrans_boundary(in_encoder=0x0000000102100f50) + 2186 at ipa-utils.h:109 frame #4: 0x0000000100ab3265 cc1plus`ipa_write_summaries(offload_lto_mode=<unavailable>) + 469 at passes.c:2511 frame #5: 0x000000010069a1bd cc1plus`symbol_table::compile(this=0x0000000142605000) + 1805 at cgraphunit.c:2091 frame #6: 0x000000010069bfde cc1plus`symbol_table::finalize_compilation_unit(this=0x0000000142605000) + 110 at cgraphunit.c:2340 frame #7: 0x0000000100107ad0 cc1plus`cp_write_global_declarations() + 4608 at decl2.c:4688 frame #8: 0x0000000100b9195f cc1plus`compile_file + 143 at toplev.c:583 frame #9: 0x000000010106012f cc1plus`toplev::main(int, char**) + 1271 at toplev.c:2017 frame #10: 0x000000010105fc38 cc1plus`toplev::main(this=<unavailable>, argc=3, argv=0x00007fff5fbff368) + 776 frame #11: 0x0000000101060d6c cc1plus`main(argc=3, argv=0x00007fff5fbff368) + 44 at main.c:38