OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [iinline-2.c] - Blame information for rev 753

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Verify that simple indirect calls are inlined even without early
2
   inlining..  */
3
/* { dg-do compile } */
4
/* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp"  } */
5
 
6
extern void non_existent(int);
7
 
8
int __attribute__ ((noinline,noclone)) get_input(void)
9
{
10
  return 1;
11
}
12
 
13
static void hooray ()
14
{
15
  non_existent (1);
16
}
17
 
18
static void hip2 (void (*g)())
19
{
20
  non_existent (2);
21
  g ();
22
}
23
 
24
static void hip1 (void (*f)(void (*)()), void (*g)())
25
{
26
  non_existent (2);
27
  f (g);
28
}
29
 
30
int main (int argc, int *argv[])
31
{
32
  int i;
33
 
34
  for (i = 0; i < get_input (); i++)
35
    hip1 (hip2, hooray);
36
  return 0;
37
}
38
 
39
/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in main" "inline"  } } */
40
/* { dg-final { scan-ipa-dump "hip2\[^\\n\]*inline copy in main" "inline"  } } */
41
/* { dg-final { cleanup-ipa-dump "inline" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.