summaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-10-20 15:20:29 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-10-20 08:20:29 -0700
commitfabb2a3def3f31878a3820e21d0630452c0d2f5b (patch)
treedcff7f238c747523953cdf61691ca4d7ab2279b1 /gcc/cgraphbuild.c
parentc207fd995845c854ed16e61a17c1c0a6d27a068a (diff)
downloadgcc-fabb2a3def3f31878a3820e21d0630452c0d2f5b.tar.gz
Skip local error_mark_node decls
There is no need to finalize local error_mark_node decls. gcc/ PR target/66810 * cgraphbuild.c (pass_build_cgraph_edges::execute): Skip local error_mark_node decls. gcc/testsuite/ PR target/66810 * gcc.target/i386/pr66810.c: New test. From-SVN: r229083
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r--gcc/cgraphbuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 33b01be83ac..b0815c987cb 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -381,7 +381,8 @@ pass_build_cgraph_edges::execute (function *fun)
FOR_EACH_LOCAL_DECL (fun, ix, decl)
if (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
- && !DECL_HAS_VALUE_EXPR_P (decl))
+ && !DECL_HAS_VALUE_EXPR_P (decl)
+ && TREE_TYPE (decl) != error_mark_node)
varpool_node::finalize_decl (decl);
record_eh_tables (node, fun);