public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, PR 48601] cgraph_get_create_node in emultls.c
@ 2011-04-15 17:33 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2011-04-15 17:33 UTC (permalink / raw)
  To: GCC Patches

Hi,

lower_emutls_function_body in emultls.c should use
cgraph_get_create_node to create call graph nodes if need be because
it is introducing TLS builtin decls into IL.

I have bootstrapped and tested this on x86_64-linux (where the bug
does not happen) and in bugzilla it has been confirmed it fixes the
issue.  It is rather straight-forward and was pre-approved on IRC by
Honza so I am about to commit it now.  Testcases are already in the
testsuite.

Thanks,

Martin



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.

Index: src/gcc/tree-emutls.c
===================================================================
--- src.orig/gcc/tree-emutls.c
+++ src/gcc/tree-emutls.c
@@ -619,8 +619,9 @@ lower_emutls_function_body (struct cgrap
 
   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)
     {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-15 17:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 17:33 [PATCH, PR 48601] cgraph_get_create_node in emultls.c Martin Jambor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).