summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr26213.c
blob: 7a6600c18d504e857b8923d2822e724beddc5b52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void
xnanosleep (_Bool overflow)
{
  struct { int tv_nsec; } ts_sleep;
  if (0 <= ts_sleep.tv_nsec)
    overflow |= 1;

  for (;;)
    {
      if (overflow)
        ts_sleep.tv_nsec = 0;
      if (foo (ts_sleep))
        break;
    }
}