view gcc/testsuite/c-c++-common/pr88664-1.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +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;
}