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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [indir-call-prof.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */
2
 
3
static int a1 (void)
4
{
5
    return 10;
6
}
7
 
8
static int a2 (void)
9
{
10
    return 0;
11
}
12
 
13
typedef int (*tp) (void);
14
 
15
static tp aa [] = {a2, a1, a1, a1, a1};
16
 
17
void setp (int (**pp) (void), int i)
18
{
19
  if (!i)
20
    *pp = aa [i];
21
  else
22
    *pp = aa [(i & 2) + 1];
23
}
24
 
25
int
26
main (void)
27
{
28
  int (*p) (void);
29
  int  i;
30
 
31
  for (i = 0; i < 10; i ++)
32
    {
33
        setp (&p, i);
34
        p ();
35
    }
36
 
37
  return 0;
38
}
39
 
40
/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "profile"} } */
41
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
42
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
43
/* { dg-final-use { cleanup-ipa-dump "profile" } } */

powered by: WebSVN 2.1.0

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