This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/8087: sparc-sun-solaris2.7 C testsuite failures in execute/20020720-1.c w/-m64 or on sparcv9/sparc64
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: "David S. Miller" <davem at redhat dot com>, davem at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ghazi at caip dot rutgers dot edu, jakub at redhat dot com, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 7 Oct 2002 11:38:27 -0700
- Subject: Re: target/8087: sparc-sun-solaris2.7 C testsuite failures in execute/20020720-1.c w/-m64 or on sparcv9/sparc64
- References: <20021007.091851.94391151.davem@redhat.com> <Pine.LNX.4.33.0210071144480.26894-100000@www.eyesopen.com>
On Mon, Oct 07, 2002 at 12:04:10PM -0600, Roger Sayle wrote:
> (mem/u/f:DF (lo_sum:DI (reg/f:DI 110)
> (symbol_ref/u:DI ("*.LLC0"))) [2 S8 A64]
>
> The problem is that the code in "avoid_constant_pool_reference"
> in simplify-rtx.c (line 149), assumes that constant pool references
> are of the form "(mem (symbol_ref ...))". Indeed the macro
> CONSTANT_POOL_ADDRESS_P assumes that it is always passed a naked
> symbol_ref.
*That* is a bug. The lo_sum is a perfectly respectable way
to do this.
> + if (GET_CODE (addr) == LO_SUM
> + && GET_CODE (XEXP (addr, 1)) == SYMBOL_REF)
> + addr = XEXP (addr, 1);
Yes, this is reasonable. You don't even need the SYMBOL_REF
check here, since that'll get handled ...
> if (GET_CODE (addr) != SYMBOL_REF
> || ! CONSTANT_POOL_ADDRESS_P (addr))
... here.
r~