summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr22422.c
blob: bc176f9699af39acff8ab15b2fc853d4b7aba825 (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
/* We should not crash trying to figure out the points-to sets for the below.  We used to because we
   ended up adding pointers to the points-to set of the ANYTHING variable.  */
struct D
{
  int n;
  int c [8];
};

struct A
{
  int i;
  char *p;
};

struct B
{
  struct A *a;
  struct D *d;
};

int dtInsert1 (struct B *b)
{
  struct A a = { 0, 0 };
  struct D *d;
  b->a = &a;
  d = b->d;
  &d->c [d->n];
  return 0;
}