aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr77646.c
blob: 6366c1be7eb51c9c3430c2086c2967217d38a0c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-additional-options "-std=gnu17" } */

struct e {
    int (*f)();
    void (*g)();
} * c;
int a;
void *h();
typedef struct { struct e j; } k;
int l() { return a; }
const struct e b = {l};
void m()
{
  k *d = h();
  d->j = b;
  c = (struct e *)d;
  struct e *i = c;
  if (i->f(c))
    while (i->f(c))
      i->g();
}