This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR target/8340
> This is OK, but not for mainline, only for b-i-b. It will introduce
> regressions in ports that (wrongly) don't define
> PIC_OFFSET_TABLE_REGNUM to be INVALID_REGNUM when not using PIC. In
> particular, I see that MIPS, ia64, and alpha all define
> PIC_OFFSET_TABLE_REGNUM unconditionally.
Isn't that purposely ? There are these line in flow.c:
#ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
/* Many architectures have a GP register even without flag_pic.
Assume the pic register is not in use, or will be handled by
other means, if it is not fixed. */
if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
&& fixed_regs[PIC_OFFSET_TABLE_REGNUM])
SET_REGNO_REG_SET (set, PIC_OFFSET_TABLE_REGNUM);
#endif
--
Eric Botcazou