aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-10-18 13:39:31 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-10-18 13:39:31 -0400
commitd2f706418a847ebd9565638d76defc30ba9c30a0 (patch)
tree43dc312763e729979a1b15a06aec089851e93abc /gcc/cp
parenta2e70335e27f8e348cf5c8d11765a46d82282669 (diff)
downloadgcc-d2f706418a847ebd9565638d76defc30ba9c30a0.zip
gcc-d2f706418a847ebd9565638d76defc30ba9c30a0.tar.gz
gcc-d2f706418a847ebd9565638d76defc30ba9c30a0.tar.bz2
re PR c++/50742 (tree check fail in check_previous_goto_1)
PR c++/50742 * decl.c (check_previous_goto_1): Handle using-decl. From-SVN: r180160
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ad46384..24ca654 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2011-10-18 Jason Merrill <jason@redhat.com>
+ PR c++/50742
+ * decl.c (check_previous_goto_1): Handle using-decl.
+
+2011-10-18 Jason Merrill <jason@redhat.com>
+
PR c++/50500
DR 1082
* class.c (type_has_user_declared_move_constructor): New.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 8b5033f..4b5b6c8 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2683,7 +2683,8 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
tree new_decls, old_decls = (b == level ? names : NULL_TREE);
for (new_decls = b->names; new_decls != old_decls;
- new_decls = DECL_CHAIN (new_decls))
+ new_decls = (DECL_P (new_decls) ? DECL_CHAIN (new_decls)
+ : TREE_CHAIN (new_decls)))
{
int problem = decl_jump_unsafe (new_decls);
if (! problem)