view gcc/testsuite/c-c++-common/pr88664-1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
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;
}