From fabb2a3def3f31878a3820e21d0630452c0d2f5b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 20 Oct 2015 15:20:29 +0000 Subject: 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 --- gcc/cgraphbuild.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/cgraphbuild.c') 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); -- cgit v1.2.1