summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 15:20:29 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 15:20:29 +0000
commit66205a6d2be62fc683ddc2499e9481328efae4d4 (patch)
treedcff7f238c747523953cdf61691ca4d7ab2279b1
parent80d3e9ad6d0cf30b4a077096f107440089ce6707 (diff)
downloadgcc-66205a6d2be62fc683ddc2499e9481328efae4d4.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229083 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cgraphbuild.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr66810.c10
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3394723d7d..44760d41734 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
+ PR target/66810
+ * cgraphbuild.c (pass_build_cgraph_edges::execute): Skip local
+ error_mark_node decls.
+
+2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
+
PR target/67963
PR target/67985
* common/config/i386/i386-common.c (ix86_handle_option): Remove
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);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7d4c6f83276..1d8f1cb8c9e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
+ PR target/66810
+ * gcc.target/i386/pr66810.c: New test.
+
+2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
+
PR target/67963
PR target/67985
* gcc.target/i386/pr67963-1.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr66810.c b/gcc/testsuite/gcc.target/i386/pr66810.c
new file mode 100644
index 00000000000..4778b37a244
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr66810.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-mno-sse -mno-mmx -miamcu" } */
+
+int vv;
+
+void
+i (void)
+{
+ static int a[vv]; /* { dg-error "storage size" } */
+}