This is the mail archive of the
mailing list for the GCC project.
Re: Invalid address after reload
Vander Aa Tom wrote:
This fails the "legitimate address" constraint since I'm not allowing a
mem inside another mem.
Sounds like a REG_OK_STRICT bug. GO_IF_LEGITIMATE_ADDRESS should accept
a pseudo-reg when !REG_OK_STRICT, and should reject a pseudo-reg when
REG_OK_STRICT. In reload, an unallocated pseudo-reg is really a memory
reference in disguise. This is typically handled by having two
different versions of macros like REG_OK_FOR_BASE_P.
GO_IF_LEGITIMATE_ADDRESS then uses these macros for its checks. This is
a common mistake in first time ports.
See also strict_memory_address_p in reload.c, and memory_address_p in