re PR target/8087 (sparc-sun-solaris2.7 C testsuite failures in execute/20020720...
authorRoger Sayle <roger@eyesopen.com>
Tue, 8 Oct 2002 20:49:02 +0000 (20:49 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 8 Oct 2002 20:49:02 +0000 (20:49 +0000)
PR target/8087
* simplify-rtx.c (avoid_constant_pool_reference):  Allow constant
pool references that are constructed using LO_SUM.

From-SVN: r57942

gcc/ChangeLog
gcc/simplify-rtx.c

index 719625767fbfb61ef8826ee974d5f6c2409b5beb..1ebd0b3a2c0befa80fdf4d65c42885a4c3b0df2b 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-08  Roger Sayle  <roger@eyesopen.com>
+
+       PR target/8087
+       * simplify-rtx.c (avoid_constant_pool_reference):  Allow constant
+       pool references that are constructed using LO_SUM.
+
 2002-10-08  Nathan Sidwell  <nathan@codesourcery.com>
 
        * c-opts.c (c_common_decode_option): Add warn_strict_aliasing to
index c49ad634bd55faf2478056f0bd93afa5897c179b..cd7e28b45c74c247d2df96f1f4c82cd8c6d6986e 100644 (file)
@@ -146,6 +146,9 @@ avoid_constant_pool_reference (x)
     return x;
   addr = XEXP (x, 0);
 
+  if (GET_CODE (addr) == LO_SUM)
+    addr = XEXP (addr, 1);
+
   if (GET_CODE (addr) != SYMBOL_REF
       || ! CONSTANT_POOL_ADDRESS_P (addr))
     return x;