http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57366
Bug ID: 57366 Summary: gcc.dg/lto/attr-weakref-1 FAILs Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: hubicka at gcc dot gnu.org Depends on: 47333 Host: *-*-solaris2.*, x86_64-unknown-linux-gnu Target: *-*-solaris2.*, x86_64-unknown-linux-gnu Build: *-*-solaris2.*, x86_64-unknown-linux-gnu The new gcc.dg/lto/attr-weakref-1 testcase FAILs in two different, but probably related ways: On Solaris with Sun as as well as on Linux/x64 configured without weakref support (gcc_cv_as_weakref=no when configuring/building), I get FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O0 -flto -flto-partition=none UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O0 -flto -flto-partition=none FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O2 -flto -flto-partition=none UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O2 -flto -flto-partition=none FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O0 -flto -flto-partition=1to1 (internal compiler error) UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O0 -flto -flto-partition=1to1 FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O2 -flto -flto-partition=1to1 UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O2 -flto -flto-partition=1to1 FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O0 -flto UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O0 -flto FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O2 -flto UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O2 -flto For the first failure, I see output is: Undefined first referenced^M symbol in file^M callmealias.lto_priv.1 /var/tmp//cc0paO3g.lto.o^M callmealias.lto_priv.2 /var/tmp//cc0paO3g.lto.o^M ld: fatal: symbol referencing errors. No output written to gcc-dg-lto-attr-weakref-1-01.exe^M collect2: error: ld returned 1 exit status^M in gcc.log. This is probably related to broken LTO support for non-weakref toolchains, cf. PR lto/47333 which is still unfixed despite being a 4.8/4.9 regression. Again, on both Solaris and Linux/x64 with gas/gld 2.23.1, I get FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects WARNING: program timed out. FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects FAIL: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o link, -O2 -flto -fuse-linker-plugin UNRESOLVED: gcc.dg/lto/attr-weakref-1 c_lto_attr-weakref-1_0.o-c_lto_attr-weakref-1_2.o execute -O2 -flto -fuse-linker-plugin For the first failure, I have output is: `callmefirst' referenced in section `.text.startup' of /var/tmp//cc6Aaqoc.lto.o: defined in discarded section `.text' of c_lto_attr-weakref-1_0.o (symbol from plugin)^M `callmesecond' referenced in section `.text.startup' of /var/tmp//cc6Aaqoc.lto.o: defined in discarded section `.text' of c_lto_attr-weakref-1_0.o (symbol from plugin)^M collect2: error: ld returned 1 exit status^M Rainer