X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcgraph.c;h=b1eea0b080fe7946352a5917e28fa60436d705ad;hb=e08db3bb5ff83e94911a23e2b13dfcbc30027ef8;hp=73dbfb3aa8b44ef6e16f2ba0608debf8ce034deb;hpb=8325d2dee5168c751bed8eb36affe5bf794932ef;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 73dbfb3aa8b..b1eea0b080f 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -936,7 +936,11 @@ cgraph_release_function_body (struct cgraph_node *node) DECL_STRUCT_FUNCTION (node->decl) = NULL; } DECL_SAVED_TREE (node->decl) = NULL; - DECL_INITIAL (node->decl) = error_mark_node; + /* If the node is abstract and needed, then do not clear DECL_INITIAL + of its associated function function declaration because it's + needed to emit debug info later. */ + if (!node->abstract_and_needed) + DECL_INITIAL (node->decl) = error_mark_node; } /* Remove the node from cgraph. */ @@ -1423,7 +1427,7 @@ cgraph_function_body_availability (struct cgraph_node *node) avail = AVAIL_NOT_AVAILABLE; else if (node->local.local) avail = AVAIL_LOCAL; - else if (node->local.externally_visible) + else if (!node->local.externally_visible) avail = AVAIL_AVAILABLE; /* If the function can be overwritten, return OVERWRITABLE. Take