This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch emutls]:Fix PR 65566
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 31 Mar 2015 13:35:56 +0200
- Subject: [patch emutls]:Fix PR 65566
- Authentication-results: sourceware.org; auth=none
Hi,
This patch avoids that we try to operate on function-decl's cfun equal
to NULL within lower_emutls_function_body.
ChangeLog
2015-03-31 Kai Tietz <ktietz@redhat.com>
PR target/65566
* tree-emutls.c (lower_emutls_function_body): Don't try to
operate on node's decl function is NULL.
Ok for apply?
Regards,
Kai
Index: tree-emutls.c
===================================================================
--- tree-emutls.c (Revision 221789)
+++ tree-emutls.c (Arbeitskopie)
@@ -635,6 +635,12 @@ lower_emutls_function_body (struct cgraph_node *no
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
+ if (!cfun)
+ {
+ pop_cfun ();
+ return;
+ }
+
d.cfun_node = node;
d.builtin_decl = builtin_decl_explicit (BUILT_IN_EMUTLS_GET_ADDRESS);
/* This is where we introduce the declaration to the IL and so we have to