This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix an alpha tls failure


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]