summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr46398.c
blob: 9110bbbbe0686c0882119309ec0e9e5e4876a800 (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
/* { dg-do run } */

int __attribute__((noinline))
test (int token)
{
  int done = 0;
  int virtual_p = 0;
  while (!done)
    {
      if (token == 42)
	virtual_p = 1;
      else
	done = 1;
    }
  return virtual_p;
}
extern void abort (void);
int
main()
{
  if (test (0) != 0)
    abort ();
  return 0;
}