From 8e5837bc114ab38055017e6825724ffbaa277305 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 15 Apr 2011 20:20:46 +0200 Subject: [PATCH] re PR middle-end/48601 (ICE in lower_emutls_function_body, at tree-emutls.c:623) 2011-04-15 Martin Jambor 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 | 7 +++++++ gcc/tree-emutls.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f047ac34c17..85af6832fc8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-04-15 Martin Jambor + + 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 * c-decl.c (detect_field_duplicates): Call diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index cc01fb39438..d29524997db 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -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) { -- 2.30.2