summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr82628.c
blob: d71352204853ae25fe32636425540cf91d1a7715 (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
34
/* { dg-do run { target ia32 } } */
/* { dg-options "-Os" } */

void
__attribute__ ((noipa))
foo (const char *x)
{
  asm volatile ("" : "+g" (x) : : "memory");
  if (x)
    __builtin_abort ();
}

int a, b = 1;

int
main ()
{
  while (1)
    {
      unsigned long long d = 18446744073709551615UL;
      while (1)
	{
	  int e = b;
	  while (d < 2)
	    foo ("0");
	  if (a)
	    d++;
	  if (b)
	    break;
	}
      break;
    }
  return 0;
}