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 e49888ff3eb..2867acb1d36 100644 --- a/clang/test/Sema/asm.c +++ b/clang/test/Sema/asm.c @@ -171,3 +171,9 @@ void fn1() { : [l] "=r"(l) : "[l],m"(l)); // expected-error {{asm constraint has an unexpected number of alternatives: 1 vs 2}} } + +void fn2() { + int l; + __asm__("" + : "+&m"(l)); // expected-error {{invalid output constraint '+&m' in asm}} +} |