[Bug target/104117] [9,10,11,12 Regression] Darwin ppc64 uses invalid non-PIC address to access constants (in PIC code).
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 20 14:31:39 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 52242
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52242&action=edit
RTL from LRA
this is not legal in PIC code (the symbol ref needs to be wrapped in a
UNSPEC_MACHOPIC_OFFSET:
(insn 55 10 4 2 (set (reg:DI 2 r2 [137])
(high:DI (symbol_ref/u:DI ("*lC0") [flags 0x2])))
"/source/test/ppc/pr104117.c":10:7 11 {macho_high_di}
(nil))
(insn 4 55 5 2 (set (reg:DI 63 f31 [orig:122 pretmp_11+-4 ] [122])
(mem/u/c:DI (lo_sum:DI (reg:DI 2 r2 [137])
(symbol_ref/u:DI ("*lC0") [flags 0x2])) [0 S8 A64]))
"/source/test/ppc/pr104117.c":10:7 660 {*movdi_internal64}
(expr_list:REG_EQUAL (const_int 1 [0x1])
(nil)))
More information about the Gcc-bugs
mailing list