summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr39132.c
blob: f6e2907e0d6c58b7c680c54ee9d77455f20b1638 (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
25
26
27
28
29
30
31
32
33
34
/* { dg-do run } */
/* { dg-options "-ftree-loop-distribution" } */

extern void abort(void);

struct epic_private
{
  unsigned int *rx_ring;
  unsigned int rx_skbuff[5];
};

int
main (void)
{
  struct epic_private ep;
  unsigned int rx_ring[5];
  int i;

  ep.rx_skbuff[0] = 5;

  ep.rx_ring = rx_ring;

  for (i = 0; i < 5; i++)
    {
      ep.rx_ring[i] = i;
      ep.rx_skbuff[i] = 0;
    }

  if (ep.rx_skbuff[0] != 0)
    abort ();

  return 0;
}