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)))

Reply via email to