diff options
Diffstat (limited to 'clang/test/Sema/asm.c')
-rw-r--r-- | clang/test/Sema/asm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c index 52611faf3db..73d081ddd38 100644 --- a/clang/test/Sema/asm.c +++ b/clang/test/Sema/asm.c @@ -79,3 +79,9 @@ int test7(unsigned long long b) { // <rdar://problem/7574870> asm volatile (""); // expected-warning {{meaningless 'volatile' on asm outside function}} + +// PR3904 +int test8(int i) { + // A number in an input constraint can't point to a read-write constraint. + asm ("" : "+r" (i), "=r"(i) : "0" (i)); // expected-error{{invalid input constraint '0' in asm}} +} |