2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / asm-4.c
blob6cbbfd0d51f26955f6d31a5df1b458a564090c90
1 /* { dg-do compile } */
2 /* { dg-options "" } */
4 /* "p" modifier can't be used to generate a valid memory address with ILP32. */
5 /* { dg-skip-if "" { aarch64*-*-* && ilp32 } } */
7 int main()
9 int x, y, z;
11 asm volatile ("test0 X%0Y%[arg]Z" : [arg] "=g" (x));
12 asm volatile ("test1 X%[out]Y%[in]Z" : [out] "=g" (y) : [in] "0"(y));
13 asm volatile ("test2 X%a0Y%a[arg]Z" : : [arg] "p" (&z));
14 asm volatile ("test3 %[in]" : [inout] "=g"(x) : "[inout]" (x), [in] "g" (y));
17 /* { dg-final { scan-assembler {test0 X(.*)Y\1Z} } } */
18 /* { dg-final { scan-assembler {test1 X(.*)Y\1Z} } } */
19 /* { dg-final { scan-assembler {test2 X(.*)Y\1Z} } } */