aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2009-02-10 16:33:19 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2009-02-10 16:33:19 +0000
commita03813c899614172d4c20b021868949cb7354415 (patch)
treed73ffefdea836e48d49fe1c2ea7571b5a91bfaab /gcc
parent9b43d37b8305a4db4058fb5f9d9ce08463b4df06 (diff)
downloadgcc-a03813c899614172d4c20b021868949cb7354415.zip
gcc-a03813c899614172d4c20b021868949cb7354415.tar.gz
gcc-a03813c899614172d4c20b021868949cb7354415.tar.bz2
re PR c/39084 (ice on struct redefinition)
PR c/39084 * c-decl.c (start_struct): Return NULL on error. From-SVN: r144067
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 229aa48..4566250 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-10 Steve Ellcey <sje@cup.hp.com>
+
+ PR c/39084
+ * c-decl.c (start_struct): Return NULL on error.
+
2009-02-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/39124
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 9fadad3..491e7bb 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5367,6 +5367,8 @@ start_struct (enum tree_code code, tree name)
error ("redefinition of %<union %E%>", name);
else
error ("redefinition of %<struct %E%>", name);
+ /* Don't create structures using a name already in use. */
+ ref = NULL_TREE;
}
else if (C_TYPE_BEING_DEFINED (ref))
{