summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20071128-1.c
blob: 14b3f939885beeb5bd8654eb60294947796b1c3b (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
/* PR tree-optimization/34140 */
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */

struct S
{
  unsigned int s;
};
struct T
{
  struct S t[2];
  unsigned int u : 1;
};

void
foo (int x, int y, int z)
{
  int i;
  struct T t;

  t.u = t.u;
  for (i = 0; i < x; i++)
    if (z != 1)
      t.t[i].s = y || t.u;
}