[Bug middle-end/53093] [4.8 Regression]: tls/alias-1.c ICE, emutls
hubicka at ucw dot cz
gcc-bugzilla@gcc.gnu.org
Wed Apr 25 17:06:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53093
--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> 2012-04-25 17:06:41 UTC ---
Hi,
the problem seems to be quite easy. We have variable and alias.
The code first counts number of variables and allocated vectors, then it
inserts
aliases, too, and the length of vector is not enough anymore.
Can you, please, test the following patch? I will try to work out why this
did not ICE before.
Honza
Index: tree-emutls.c
===================================================================
--- tree-emutls.c (revision 186831)
+++ tree-emutls.c (working copy)
@@ -706,7 +706,7 @@ create_emultls_var (struct varpool_node
cdecl = new_emutls_decl (var->symbol.decl, var->alias_of);
cvar = varpool_get_node (cdecl);
- VEC_quick_push (varpool_node_ptr, control_vars, cvar);
+ VEC_safe_push (varpool_node_ptr, heap, control_vars, cvar);
if (!var->alias)
{
More information about the Gcc-bugs
mailing list