From: aoliva Date: Fri, 18 Jan 2013 10:57:58 +0000 (+0000) Subject: PR libmudflap/53359 X-Git-Tag: upstream/4.9.2~8046 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9490210142caec4f421105617ee2eb6ca3c988b;p=platform%2Fupstream%2Flinaro-gcc.git PR libmudflap/53359 * tree-mudflap.c (mudflap_finish_file): Skip deferred decls not found in the symtab. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195290 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6eff629..9763bca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2013-01-18 Alexandre Oliva + PR libmudflap/53359 + * tree-mudflap.c (mudflap_finish_file): Skip deferred decls + not found in the symtab. + +2013-01-18 Alexandre Oliva + PR rtl-optimization/55547 PR rtl-optimization/53827 PR debug/53671 diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index 3c866bc..b250bfe 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -1334,6 +1334,16 @@ mudflap_finish_file (void) if (! TREE_PUBLIC (obj) && ! TREE_ADDRESSABLE (obj)) continue; + /* If we're neither emitting nor referencing the symbol, + don't register it. We have to register external symbols + if they happen to be in other files not compiled with + mudflap (say system libraries), and we must not register + internal symbols that we don't emit or they'll become + dangling references or force symbols to be emitted that + didn't have to. */ + if (!symtab_get_node (obj)) + continue; + if (! COMPLETE_TYPE_P (TREE_TYPE (obj))) { warning (OPT_Wmudflap,