aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-04-11 10:42:41 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-04-11 10:42:41 -0700
commitdb57d41371f0fd1478caabf192bc798d57a86da3 (patch)
tree70a8ad75957add7419fd63475412320625cda42b /gcc/c-decl.c
parent9772d94feb04d7ad3a5fdf787c992f7ac88bc186 (diff)
downloadgcc-db57d41371f0fd1478caabf192bc798d57a86da3.zip
gcc-db57d41371f0fd1478caabf192bc798d57a86da3.tar.gz
gcc-db57d41371f0fd1478caabf192bc798d57a86da3.tar.bz2
(finish_decl): Don't preserve initializer if it is error_mark_node.
From-SVN: r7033
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index c12d673..6055e3a 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3597,7 +3597,7 @@ finish_decl (decl, init, asmspec_tree)
/* We make an exception for inline functions, since it's
normal for a local extern redeclaration of an inline function
to have a copy of the top-level decl's DECL_INLINE. */
- if (DECL_INITIAL (decl) != 0)
+ if (DECL_INITIAL (decl) != 0 && DECL_INITIAL (decl) != error_mark_node)
{
/* If this is a const variable, then preserve the
initializer instead of discarding it so that we can optimize