File nov74176.diff of Package gcc33
This is for PR 20286, which is an IA-64 abort with a testcase that
redefines an external __thread variable as static __thread.
This testcase hits the abort in ia64_encode_section_info which aborts if
a thread variable changes state. This is intended to catch accidental
transitions between thread data and small data. In this case, it is
accidentally catching an internal TLS transition from INITIAL_EXEC to
LOCAL_EXEC, which is an allowable transition. This patch fixes the
problem by only calling the abort if either state involves small data.
This patch applies only to gcc-3.3. This was fixed in gcc-3.4 by using
default_encode_section_info, which is not present in gcc-3.3. Since
pulling all of this into gcc-3.3 is a rather large patch, including
non-IA-64 changes, I believe it is better to just add a gcc-3.3 specific
fix to the ia64.c file.
This was tested with a bootstrap and make check with and without the
patch on ia64-linux using the top of the gcc-3.3 branch. There were no
2005-03-23 James E Wilson <firstname.lastname@example.org>
* config/ia64/ia64.c (ia64_encode_section_info): Only abort if encoding
or symbol_str is 's'.
--- gcc/config/ia64/ia64.c.orig 2009-11-20 13:06:08.000000000 +0100
+++ gcc/config/ia64/ia64.c 2009-11-20 13:06:32.000000000 +0100
@@ -7364,7 +7364,8 @@ ia64_encode_section_info (decl, first)
if (encoding == symbol_str)
/* ??? Sdata became thread or thread becaome not thread. Lose. */
- abort ();
+ if (encoding == 's' || symbol_str == 's')
+ abort ();
len = strlen (symbol_str);