summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/goto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/goto.cpp')
-rw-r--r--clang/test/SemaCXX/goto.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/goto.cpp b/clang/test/SemaCXX/goto.cpp
index dd2e03d4717..b2b1e6f391f 100644
--- a/clang/test/SemaCXX/goto.cpp
+++ b/clang/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'}}
}
OpenPOWER on IntegriCloud