[Bug target/98778] asm() accepts certain "i" (symbol) constructs despite -fpie for x86-64

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 14 09:37:52 GMT 2021


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|inline-asm                  |target

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
          else if (!SYMBOL_REF_FAR_ADDR_P (op0)
                   && (SYMBOL_REF_LOCAL_P (op0)
                       || (HAVE_LD_PIE_COPYRELOC
                           && flag_pie
                           && !SYMBOL_REF_WEAK (op0)
                           && !SYMBOL_REF_FUNCTION_P (op0)))
                   && ix86_cmodel != CM_LARGE_PIC)
            return true;


Is why it is accepted. inside legitimate_pic_address_disp_p.

SYMBOL_REF_LOCAL_P is true as it is defined in the TU for PIE case.


More information about the Gcc-bugs mailing list