This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/53093] [4.8 Regression]: tls/alias-1.c ICE, emutls


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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]