This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix an alpha tls failure
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Mar 2006 07:53:49 -0800
- Subject: 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;