aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/goto.cpp
diff options
context:
space:
mode:
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'}}
}