diff options
Diffstat (limited to 'test/CodeGen/asm-inout.c')
-rw-r--r-- | test/CodeGen/asm-inout.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c index 5b0a5f7..29142f7 100644 --- a/test/CodeGen/asm-inout.c +++ b/test/CodeGen/asm-inout.c @@ -29,3 +29,12 @@ asm( : "edi" ); } + +// PR8959 - This should implicitly truncate the immediate to a byte. +int test4(volatile int *addr) { + unsigned char oldval; + __asm__ ("frob %0" : "=r"(oldval) : "0"(0xff)); + return (int)oldval; +// CHECK: call i8 asm "frob $0", "=r,0{{.*}}"(i8 -1) +} + |