diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/pfpo.c')
-rw-r--r-- | gcc/testsuite/gcc.target/s390/pfpo.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/pfpo.c b/gcc/testsuite/gcc.target/s390/pfpo.c new file mode 100644 index 0000000000..32725c991a --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pfpo.c @@ -0,0 +1,21 @@ +/* The pfpo instruction generated by this code clobbers the r1 register while + it was still in use. */ + +/* { dg-do run } */ +/* { dg-options "-O0 -march=z10 -mzarch" } */ + +int foo(int x) +{ + return x; +} + +int bar(int i, float f) +{ + return i; +} + +int main() +{ + _Decimal32 d = 7; + return bar(foo(0x10203040), (float)d) == 0x10203040 ? 0 : 1; +} |