summaryrefslogtreecommitdiff
path: root/clang/test/Sema/array-bounds-ptr-arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/array-bounds-ptr-arith.c')
-rw-r--r--clang/test/Sema/array-bounds-ptr-arith.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Sema/array-bounds-ptr-arith.c b/clang/test/Sema/array-bounds-ptr-arith.c
index e3de06a104e4..ac96b896291a 100644
--- a/clang/test/Sema/array-bounds-ptr-arith.c
+++ b/clang/test/Sema/array-bounds-ptr-arith.c
@@ -37,3 +37,15 @@ void radar11387038() {
RDar11387038_B *pRDar11387038_B;
struct RDar11387038* y = &(*pRDar11387038_B->x)->z[4];
}
+
+void pr51682 (void) {
+ int arr [1];
+ switch (0) {
+ case 0:
+ break;
+ case 1:
+ asm goto (""::"r"(arr[42] >> 1)::failed); // no-warning
+ break;
+ }
+failed:;
+}