summaryrefslogtreecommitdiffstats
path: root/test/Sema/indirect-goto.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/indirect-goto.c')
-rw-r--r--test/Sema/indirect-goto.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/indirect-goto.c b/test/Sema/indirect-goto.c
new file mode 100644
index 0000000..35fb5e6
--- /dev/null
+++ b/test/Sema/indirect-goto.c
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+struct c {int x;};
+int a(struct c x, long long y) {
+ goto *x; // expected-error{{incompatible type}}
+ goto *y; // expected-warning{{incompatible integer to pointer conversion}}
+}
+
OpenPOWER on IntegriCloud