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 <kti...@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