re PR middle-end/48601 (ICE in lower_emutls_function_body, at tree-emutls.c:623)
authorMartin Jambor <mjambor@suse.cz>
Fri, 15 Apr 2011 18:20:46 +0000 (20:20 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 15 Apr 2011 18:20:46 +0000 (20:20 +0200)
2011-04-15  Martin Jambor  <mjambor@suse.cz>

PR middle-end/48601
* tree-emutls.c (lower_emutls_function_body): Call
cgraph_get_create_node instead of cgraph_get_node.  Do not assert the
result is non-NULL.

From-SVN: r172512

gcc/ChangeLog
gcc/tree-emutls.c

index f047ac34c174a42f168b3d887f93b557fbec6516..85af6832fc8b078f3809b114745d841ff7f946ba 100644 (file)
@@ -1,3 +1,10 @@
+2011-04-15  Martin Jambor  <mjambor@suse.cz>
+
+       PR middle-end/48601
+       * tree-emutls.c (lower_emutls_function_body): Call
+       cgraph_get_create_node instead of cgraph_get_node.  Do not assert the
+       result is non-NULL.
+
 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * c-decl.c (detect_field_duplicates): Call
index cc01fb3943841ca39d0110c4a7fba8d29f9c699d..d29524997dbbd16e87fa30859ea9587cb07b1c9d 100644 (file)
@@ -619,8 +619,9 @@ lower_emutls_function_body (struct cgraph_node *node)
 
   d.cfun_node = node;
   d.builtin_decl = built_in_decls[BUILT_IN_EMUTLS_GET_ADDRESS];
-  d.builtin_node = cgraph_get_node (d.builtin_decl);
-  gcc_checking_assert (d.builtin_node);
+  /* This is where we introduce the declaration to the IL and so we have to
+     create a node for it.  */
+  d.builtin_node = cgraph_get_create_node (d.builtin_decl);
 
   FOR_EACH_BB (d.bb)
     {