diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/asm-y.c')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/asm-y.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/asm-y.c b/gcc/testsuite/gcc.target/powerpc/asm-y.c new file mode 100644 index 000000000..7d5a6a617 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/asm-y.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +/* Test that %yN does not cause an internal error if used incorrectly. */ + +int f(int *a) +{ + asm ("#%y0" : "=m"(a[2])); /* { dg-error "try using the 'Z' constraint" } */ + asm ("#%y0" : "=m"(a[1])); /* { dg-error "try using the 'Z' constraint" } */ + asm ("#%y0" : "=m"(a[0])); +} |