Submitted By: Ryan Oliver <ryan at pha dot com dot au>
Date: 2006-04-30
Initial Package Version: 4.1.0
Origin: Jakub
Upstream Status: In GCC Trunk
Description: Fixed in GCC SVN Revision #110522
	* config/sparc/sparc.c (sparc_output_scratch_registers): Use
	#ignore instead of #scratch for %g7 .register directive.

--- trunk/gcc/config/sparc/sparc.c	2006/01/31 22:33:27	110451
+++ trunk/gcc/config/sparc/sparc.c	2006/02/02 22:49:01	110522
@@ -3693,7 +3693,10 @@
 	  && ! sparc_hard_reg_printed [i])
 	{
 	  sparc_hard_reg_printed [i] = 1;
-	  fprintf (file, "\t.register\t%%g%d, #scratch\n", i);
+	  /* %g7 is used as TLS base register, use #ignore
+	     for it instead of #scratch.  */
+	  fprintf (file, "\t.register\t%%g%d, #%s\n", i,
+		   i == 7 ? "ignore" : "scratch");
 	}
       if (i == 3) i = 5;
     }

