aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/pr61078.c
blob: 40f6ad7df098465d9e8db489d7a94e1741162b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* This testcase is extracted from s390_emit_prologue.  The negation
   of a 64bit value got split incorrectly on 31 bit.  */

/* { dg-do run { target { ! lp64 } } } */
/* { dg-options "-O2 -mesa" } */

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;
}