[Bug lto/81004] [7 Regression] linking failed with -flto and static libboost_program_options

clyon at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 8 08:39:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004

Christophe Lyon <clyon at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clyon at gcc dot gnu.org

--- Comment #30 from Christophe Lyon <clyon at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #29)
> Should be fixed on all active branches.

Actually the backport to gcc-6-branch introduced a regression. On arm, I'm
seeing:
lto1: fatal error: missing resolution data for _ZTV4base
compilation terminated.
lto-wrapper: fatal error:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabihf/gcc3/gcc/testsuite/g++2/../../xg++
returned 1 exit status
compilation terminated.
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-linux-gnueabihf/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: g++.dg/lto/20081125 cp_lto_20081125_0.o-cp_lto_20081125_1.o link, -flto
-flto-partition=1to1
UNRESOLVED: g++.dg/lto/20081125 cp_lto_20081125_0.o-cp_lto_20081125_1.o execute
-flto -flto-partition=1to1

Similar regressions on:
    g++.dg/lto/20081125 cp_lto_20081125_0.o-cp_lto_20081125_1.o link, -flto
-flto-partition=1to1
    g++.dg/lto/20090311 cp_lto_20090311_0.o-cp_lto_20090311_1.o link, -O0 -flto
-flto-partition=none -fuse-linker-plugin
    g++.dg/lto/20090311 cp_lto_20090311_0.o-cp_lto_20090311_1.o link, -O0 -flto
-fuse-linker-plugin -fno-fat-lto-objects 
    g++.dg/lto/20091210-1 cp_lto_20091210-1_0.o-cp_lto_20091210-1_1.o link, -O0
-flto -flto-partition=none -fuse-linker-plugin
    g++.dg/lto/20091210-1 cp_lto_20091210-1_0.o-cp_lto_20091210-1_1.o link, -O0
-flto -fuse-linker-plugin -fno-fat-lto-objects 
    g++.dg/torture/pr67600.C   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (test for excess errors)


On aarch64, one of the testcases now produces an ICE:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/gcc/testsuite/g++3/../../xg++
-B/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/gcc/testsuite/g++3/../../
cp_lto_20091210-1_0.o cp_lto_20091210-1_1.o g++_tg.o
-fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/aarch64-none-elf/libstdc++-v3/include/aarch64-none-elf
-I/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/aarch64-none-elf/libstdc++-v3/include
-I/libstdc++-v3/libsupc++ -I/libstdc++-v3/include/backward
-I/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -flto
-flto-partition=none -fuse-linker-plugin -specs=aem-ve.specs
-L/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/aarch64-none-elf/./libstdc++-v3/src/.libs
-B/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/aarch64-none-elf/./libstdc++-v3/src/.libs
-Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -o
g++-dg-lto-20091210-1-01.exe
lto1: internal compiler error: in register_resolution, at lto/lto.c:840
0x5dd465 register_resolution
        /gcc/lto/lto.c:840
0x5ddf57 lto_read_decls
        /gcc/lto/lto.c:1792
0x5dff11 lto_file_finalize
        /gcc/lto/lto.c:2064
0x5dff11 lto_create_files_from_ids
        /gcc/lto/lto.c:2074
0x5dff11 lto_file_read
        /gcc/lto/lto.c:2115
0x5dff11 read_cgraph_and_symbols
        /gcc/lto/lto.c:2825
0x5dff11 lto_main()
        /gcc/lto/lto.c:3337
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.
lto-wrapper: fatal error:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-elf/gcc3/gcc/testsuite/g++3/../../xg++
returned 1 exit status
compilation terminated.
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/bin/ld: error:
lto-wrapper failed
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: g++.dg/lto/20091210-1 cp_lto_20091210-1_0.o-cp_lto_20091210-1_1.o link,
-O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error)


More information about the Gcc-bugs mailing list