[committed] PR63171: Fix FOR_EACH_SUBRTX in tls_referenced_p
diff mbox

Message ID 87y4txxdx7.fsf@googlemail.com
State New
Headers show

Commit Message

Richard Sandiford Sept. 6, 2014, 10:04 a.m. UTC
tls_referenced_p shouldn't skip subrtxes of CONSTs, since it's supposed
to be looking at all SYMBOL_REFs in the pattern.  The patched version
was what I'd meant to write originally, sorry that it slipped though.

Tested on powerpc64-linux-gnu and applied as obvious.


	PR middle-end/63171
	* rtlanal.c (tls_referenced_p): Don't skip constant subrtxes.

diff mbox

Index: gcc/rtlanal.c
--- gcc/rtlanal.c	2014-08-30 15:53:03.372153860 +0100
+++ gcc/rtlanal.c	2014-09-06 10:59:18.545268494 +0100
@@ -6073,7 +6073,7 @@  tls_referenced_p (const_rtx x)
     return false;
   subrtx_iterator::array_type array;
-  FOR_EACH_SUBRTX (iter, array, x, NONCONST)
+  FOR_EACH_SUBRTX (iter, array, x, ALL)
     if (GET_CODE (*iter) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (*iter) != 0)
       return true;
   return false;