view gcc/testsuite/gcc.dg/ipa/iinline-cstagg-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-sra -fno-ipa-cp" } */

typedef struct S
{
  int add_offset;
  int (*call)(int);
} S;

static int
bar (const S f, int x)
{
  x = f.call (x);
  return x;
}

static int
thisisthetarget (int x)
{
  return x * x;
}

int
outerfunction (int x)
{
  return bar ((S){16, thisisthetarget}, x);
}


/* { dg-final { scan-ipa-dump "thisisthetarget\[^\\n\]*inline copy in outerfunction"  "inline"  } } */