aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/goto.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-24 10:35:39 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-24 10:35:39 +0000
commitfa7b8ced6f3318879b39f44b5ace8346e979826e (patch)
tree3c5cc15f150f3a2f667e3c2a55c64dd23657e09f /test/SemaCXX/goto.cpp
parentc285372e69f42d95ca638d74abd1f46bd7b77a96 (diff)
Fix the insertion of label declarations into the identifier chain in
the case where we only have a single identifier with that name in the chain. Fixes PR9463 for real this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/goto.cpp')
-rw-r--r--test/SemaCXX/goto.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/goto.cpp b/test/SemaCXX/goto.cpp
index dd2e03d471..b2b1e6f391 100644
--- a/test/SemaCXX/goto.cpp
+++ b/test/SemaCXX/goto.cpp
@@ -19,6 +19,26 @@ void f(bool b1, bool b2) {
return;
}
+namespace N {
+ float* end;
+ void f(bool b1, bool b2) {
+ {
+ do {
+ int end = 0;
+ if (b2) {
+ do {
+ goto end;
+ } while (b2);
+ }
+ end = 1;
+ } while (b1);
+ }
+
+ end:
+ return;
+ }
+}
+
void g() {
end = 1; // expected-error{{assigning to 'double *' from incompatible type 'int'}}
}