diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/pr61078.c')
-rw-r--r-- | gcc/testsuite/gcc.target/s390/pr61078.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/pr61078.c b/gcc/testsuite/gcc.target/s390/pr61078.c new file mode 100644 index 00000000000..2f95eba8e9e --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr61078.c @@ -0,0 +1,26 @@ +/* This testcase is extracted from s390_emit_prologue. The negation + of a 64bit value got split incorrectly on 31 bit. */ + +/* { dg-do run } */ +/* { dg-options "-O2 -mesa -m31" } */ + +extern void abort (void); + +long long frame_size = 42; + +int __attribute__((noinline)) +foo (int a __attribute__((unused)), long long b) +{ + return (int)b; +} + +int +main () +{ + if (frame_size > 0) + { + if (foo (0, -frame_size) != -42) + abort (); + } + return 0; +} |