aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr49544.c
blob: 52f79dd7f8e3f0d3369147c682d953fe550cb46f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* 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);
}