This is the mail archive of the gcc-patches@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]

[patch emutls]:Fix PR 65566


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


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