aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr101009.c
blob: 2bbed1dfc2c6076c1c1f935250fe55935e8ede68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do run } */
/* { dg-additional-options "-fno-tree-sra -fno-tree-pre -ftree-loop-distribution" } */

struct a {
  unsigned b;
  unsigned c;
} e, *f = &e;
int d = 1;
int main() {
  for (; d; d--) {
    struct a g[] = {{2, 1}, {2, 1}};
    *f = g[1];
  }
  if (e.c != 1)
    __builtin_abort ();
  return 0;
}