view gcc/testsuite/gcc.dg/pr49544.c @ 158:494b0b89df80 default tip

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

/* PR debug/49544 */
/* { dg-do compile } */
/* { dg-options "-g -O2" } */
/* { dg-require-effective-target ptr32plus } */

__extension__ typedef __PTRDIFF_TYPE__ ptr_t;

int baz (int, int, void *);

static inline __attribute__ ((always_inline)) long
foo (int x, int y, void *z)
{
  if (y < 0)
    return baz (x, y, z);
  return 0;
}

long
bar (long x, long y, long z)
{
  return foo (x, y, (void *) (ptr_t) z);
}