aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr103376.c
blob: 22e2019105ac021e0078579130b8e164db2b2c41 (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
/* PR tree-optimization/103376 */

long long a = 0x123456789abcdef0LL, f;
int b, c, *d;

__attribute__((noipa)) void
foo (int x)
{
  asm volatile ("" : : "r" (x));
}

int
main ()
{
  long long e;
  e = a;
  if (b)
    {
      foo (c);
      d = (int *) 0;
      while (*d)
	;
    }
  f = a ^ e;
  asm volatile ("" : "+m" (f));
  if (f != 0)
    __builtin_abort ();
  return 0;
}