aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr106070.c
blob: f031516cf0c1febd874f2dc053440fc5635e928b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run } */

unsigned int a = 1;
int b = -1;
int c = 4;
unsigned long long d;

void __attribute__((noipa))
test (void)
{
  for (int i = 0; i < c; i += 2)
    d = a != (int) b ? (unsigned long long) b : (unsigned long long) a;
}

int
main ()
{
  test ();
  if (d != -1ULL)
    __builtin_abort ();
  return 0;
}