view gcc/testsuite/c-c++-common/pr88664-1.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

/* 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;
}