summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr80620.c
blob: ef56eedba5a3b667fbcfacc2c111473726cca365 (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
27
28
29
30
31
32
33
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */

long long int a = -465274079317386463LL;
int b = 856872806;
int c = -1940894202;
int d = 1718449211;
int e = -392681565;
unsigned long long int f = 13521452247506316486ULL;
int g = -13194608;

__attribute__((noinline, noclone))
void foo ()
{
  if (!a - a)
    c = b = 0;
  else
    d = 3UL * a == 0;
  if (g / a)
    e = 0 < -a + 500849970701012771LL + (unsigned long) -a;
  else
    f = 4081116982543369LL & a;
}

int
main ()
{
  asm volatile ("" : : : "memory");
  foo ();
  if (f != 2818598057803777LL)
    __builtin_abort ();
  return 0;
}