fix an alpha tls failure

Richard Henderson rth@redhat.com
Thu Mar 23 15:54:00 GMT 2006


Problem exposed by one of the fortran libgomp tls tests.
Applied to 4.0 on.


r~


        * config/alpha/alpha.c (alpha_legitimate_constant_p): Reject
        tls symbols.

Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 112319)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -2124,10 +2124,13 @@ alpha_legitimate_constant_p (rtx x)
     {
     case CONST:
     case LABEL_REF:
-    case SYMBOL_REF:
     case HIGH:
       return true;
 
+    case SYMBOL_REF:
+      /* TLS symbols are never valid.  */
+      return SYMBOL_REF_TLS_MODEL (x) == 0;
+
     case CONST_DOUBLE:
       if (x == CONST0_RTX (mode))
 	return true;



More information about the Gcc-patches mailing list