Bug 12224

Summary: TLS doesn't work
Product: gcc Reporter: H.J. Lu <hjl.tools>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P2    
Version: 3.3.2   
Target Milestone: 3.3.2   
Host: Target: ia64-hp-hpux
Build: Known to work:
Known to fail: Last reconfirmed:

Description H.J. Lu 2003-09-09 16:41:16 UTC
# cat foo.i
extern __thread int bar __attribute__ ((tls_model ("initial-exec")));
int *
foo (void)
{
  return &bar;
}
# gcc foo.i -S
foo.i: In function `foo':
foo.i:6: error: unrecognizable insn:
(insn 13 12 16 0 (nil) (set (reg:SI 339)
        (reg:DI 343)) -1 (nil)
    (expr_list:REG_DEAD (reg:DI 343)
        (nil)))
foo.i:6: internal compiler error: in extract_insn, at recog.c:2175
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 GCC Commits 2003-09-10 04:06:09 UTC
Subject: Bug 12224

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	hjl@gcc.gnu.org	2003-09-10 04:06:05

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: ia64.c 

Log message:
	2003-09-09  Richard Henderson  <rth@redhat.com>
	
	PR target/12224:
	* config/ia64/ia64.c (ia64_expand_move): Properly truncate
	result when op0 is SImode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.733&r2=1.16114.2.734
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.198.2.13&r2=1.198.2.14

Comment 2 Andrew Pinski 2003-09-10 15:19:59 UTC
Fixed for 3.3.2.