summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr52406.c
blob: 5579d0943ae24e3a703597ccd7300436e229eca1 (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
/* { dg-do run } */

extern void abort (void);
struct { int f1; } a[2];

int *b, *const k = &a[1].f1;
static int **c = &b;

int e, f, d;

int
main ()
{
  int **l = &b;
  *l = k;
  for (; d <= 0; d++)
    {
      int *j = &e;
      **c = 1;
      *l = k;
      *k ^= 0;
      f = **l;
      *j = f;
    }
  if (e != 1)
    abort ();
  return 0;
}