summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/iinline-1.c
blob: 617c484994b4d0bf25e9392b9dd1ef573c4559a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Verify that simple indirect calls are inlined even without early
   inlining..  */
/* { dg-do compile } */
/* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining"  } */

extern void non_existent(int);

static void hooray ()
{
  non_existent (1);
}

static void hiphip (void (*f)())
{
  non_existent (2);
  f ();
}

int test (void)
{
  hiphip (hooray);
  return 0;
}

/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in test"  "inline"  } } */
/* { dg-final { cleanup-ipa-dump "inline" } } */