summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-03 15:06:42 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-03 15:06:42 +0000
commit66ce73bb55dab159307d90894e7d31ad040e7c6f (patch)
tree677adb6581b12a2ebb71ea2b3137935794902c49 /gcc/cp
parent8a66c5869bf490c8986f66611457fd504e45a947 (diff)
downloadgcc-66ce73bb55dab159307d90894e7d31ad040e7c6f.tar.gz
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/24582 * g++.dg/init/switch1.C: New test. 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu> PR c++/24582 * decl.c (declare_local_label): Return 0 for variables with error_mark_node as their types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eb52015cab7..e1edc45cbb7 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c++/24582
+ * decl.c (declare_local_label): Return 0 for variables
+ with error_mark_node as their types.
+
2005-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/22434
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 7e38ec3dff1..c5fe6585996 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2147,7 +2147,8 @@ declare_local_label (tree id)
static int
decl_jump_unsafe (tree decl)
{
- if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl))
+ if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)
+ || TREE_TYPE (decl) == error_mark_node)
return 0;
if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl))