This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch hjl/iamcu/improve in repository gcc.
commit 1d9c82d8bf42120358c777dcdb2175864822ee44 Author: H.J. Lu hjl.tools@gmail.com Date: Wed Jul 8 08:28:03 2015 -0700
Skip error_mark_node type decls
There is no need to finalize error_mark_node type decls.
gcc/
PR target/66810 * cgraphbuild.c (pass_build_cgraph_edges::execute): Skip error_mark_node type decls.
gcc/testsuite/
PR target/66810 * gcc.target/i386/pr66810.c: New test. --- gcc/cgraphbuild.c | 3 ++- gcc/testsuite/gcc.target/i386/pr66810.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 7d2d096..4d679d9 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/gcc.target/i386/pr66810.c b/gcc/testsuite/gcc.target/i38 [...] new file mode 100644 index 0000000..4778b37 --- /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" } */ +}