summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr33146.c
blob: 6741fcf5d0fc9906e5eaa0cb988bee0596d62e1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
typedef struct
{
  int end;
  int term;
}
jpc_enc_pass_t;
void foo(int numpasses, jpc_enc_pass_t *p)
{
  jpc_enc_pass_t *pass;
  jpc_enc_pass_t *termpass;
  for (pass = p; pass != termpass; ++pass)
    if (!pass->term)
    {
      termpass = pass;
      while (termpass - pass < numpasses && !termpass->term)
        ++termpass;
      pass->end = termpass->end;
    }
}