aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr54409.c
blob: c7595474f5cd2aaafe260239b6da3d171e76eff6 (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
/* { dg-do compile } */

int b;

struct S
{
  char *p;
  struct {
  } s;
  int a;
};

static _Bool
fn2 (int *p1)
{
  if (b)
    {
      struct S *c = (struct S *) &p1;
      return c->a;
    }
}

_Bool
fn3 (struct S *p1)
{
  if (fn2 ((int *) &p1->s))
    return 0;
}