[PATCH] Fix PR86523
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Jul 17 08:57:00 GMT 2018
Hi Richard,
> The following fixes PR86523, we failed to assing DIE parents to some
> function-local entities with the idea scope vars would pick them up
> but that's not true for some of them.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, LTO bootstrapped
> on the GCC 8 branch (it's said LTO bootstrap is broken on trunk).
the new testcases FAIL on Solaris:
+FAIL: g++.dg/lto/pr86523-1 cp_lto_pr86523-1_0.o-cp_lto_pr86523-1_0.o link, -O2 -flto -g -shared
+FAIL: g++.dg/lto/pr86523-2 cp_lto_pr86523-2_0.o-cp_lto_pr86523-2_0.o link, -O2 -flto -g -shared
32-bit sparc and 64-bit x86 only
On sparc:
ld: warning: unwind table: file /var/tmp//ccRLBN4b.ltrans0.ltrans.o: section .eh_frame: suspicious InitialLoc value 0: binary search table will be incomplete if section requires runtime relocation
On x86:
Text relocation remains referenced
against symbol offset in file
.text (section) 0x20 cp_lto_pr86523-1_0.o
ld: fatal: relocations remain against allocatable but non-writable sections
The latter happens because the Solaris linker defaults to -z text, and
the tests aren't built as PIC. The following patch fixes this,
requiring fpic and shared support along the way, too, and also fixes the
Solaris/SPARC failure.
Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
x86_64-pc-linux-gnu. Ok for mainline?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-07-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/lto/pr86523-1_0.C: Require fpic, shared support.
(dg-lto-options): Add -fPIC.
* g++.dg/lto/pr86523-2_0.C: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite-pr86523.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180717/1cf359eb/attachment.bin>
More information about the Gcc-patches
mailing list