diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-01-10 10:43:19 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-01-10 10:43:19 +0000 |
| commit | a0040df38c96866f6f970ad0ab45e3185faceb02 (patch) | |
| tree | cdafccdf358585b2c5b6c5836268ec7e8fc9b66f /clang/test/Sema | |
| parent | 9e6d12b98c2663046a257b0c3a84a6c74ccafbdc (diff) | |
| download | bcm5719-llvm-a0040df38c96866f6f970ad0ab45e3185faceb02.tar.gz bcm5719-llvm-a0040df38c96866f6f970ad0ab45e3185faceb02.zip | |
Sema: The asm constraint '+&m' isn't valid, reject it
Don't permit '+&m' to make it to CodeGen, it's invalid.
llvm-svn: 225586
Diffstat (limited to 'clang/test/Sema')
| -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}} +} |

