aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr88664-1.c
blob: 5e680b9ae900b35550c1554ccb68de4d3daf68de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR c/88664.  */
/* { dg-do compile } */
/* { dg-options "-O" } */

struct data
{
  void *ptr;
} __attribute__((packed));

int *
fun1 (struct data *p)
{
  return (int *) p->ptr;
}

int *
fun2 (struct data *p, int *x)
{
  return x ? (*x = 1, (int *) p->ptr) : (int *) 0;
}