[PATCH, alpha]: Fix threadprivate3.f90 ICE for gcc-4.3+

Uros Bizjak ubizjak@gmail.com
Mon Aug 3 11:52:00 GMT 2009


Hello!

Attached patch fixes threadprivate3.f90 ICE for gcc-4.3 on alpha [1]. 
According to the comment in alpha_legitimate_constant_p, "TLS symbols 
are never valid.".

So, we should also reject CONST constants referencing TLS symbols, as in 
the failed insn:

(set (reg:DI 3 $3)
         (const:DI (plus:DI (symbol_ref:DI ("thrc_") [flags 0x20] 
<var_decl 0x7fff2dcd8820 thrc>)
                 (const_int 48 [0x30])))) -1 (nil))

The patch itself is bordering on obvious, and was tested on 
alpha-linux-gnu crosscompiler where it fixes the ICE. Unfortunatelly, I 
have no access to alpha box, so someone please bootstrap and regression 
test it on live target.

The problem is also present on 4.4 and 4.5 branches, but not triggered 
in the testsuite.

2009-08-03  Uros Bizjak <ubizjak@gmail.com>

     * config/alpha/alpha.c (alpha_legitimate_constant_p): Reject CONST
     constants referencing TLS symbols.

[1] http://gcc.gnu.org/ml/gcc-testresults/2009-08/msg00134.html

Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090803/dd4d8149/attachment.txt>


More information about the Gcc-patches mailing list