diff options
Diffstat (limited to 'clang/test/Sema/asm.c')
-rw-r--r-- | clang/test/Sema/asm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c index 9ed8d843eaf..76e20158c40 100644 --- a/clang/test/Sema/asm.c +++ b/clang/test/Sema/asm.c @@ -236,3 +236,15 @@ void test16() : "m" (test16_baz)); // expected-error {{reference to a global register variable in asm output with a memory constraint 'm'}} } +int test17(int t0) +{ + int r0, r1; + __asm ("addl %2, %2\n\t" + "movl $123, %0" + : "=a" (r0), + "=&r" (r1) + : "1" (t0), // expected-note {{constraint '1' is already present here}} + "1" (t0)); // expected-error {{more than one input constraint matches the same output '1'}} + return r0 + r1; +} + |