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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-prof/] [partition1.C] - Blame information for rev 701

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-require-effective-target freorder } */
2
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
3
/* { dg-skip-if "PR target/47683" { mips-sgi-irix* } } */
4
 
5
struct A { A () __attribute__((noinline)); ~A () __attribute__((noinline)); };
6
A::A () { asm volatile ("" : : : "memory"); }
7
A::~A () { asm volatile ("" : : : "memory"); }
8
 
9
int bar () __attribute__((noinline));
10
void foo () __attribute__((noinline));
11
 
12
volatile int k, l;
13
 
14
int bar (int i)
15
{
16
  void *p = __builtin_alloca (i);
17
  asm volatile ("" : : "r" (i), "r" (p) : "memory");
18
  if (k) throw 6;
19
  return ++l;
20
}
21
 
22
void foo ()
23
{
24
  A a;
25
  try {
26
    A b;
27
    int i = bar (5);
28
    try { throw 6; } catch (int) {}
29
    if (__builtin_expect (i < 4500, 0)) {
30
      bar (7);
31
      try { bar (8); } catch (long) {}
32
      bar (10);
33
      if (__builtin_expect (i < 0, 0)) {
34
        try { bar (12); } catch (...) {}
35
        bar (16);
36
        bar (122);
37
      } else {
38
        try { bar (bar (7)); } catch (int) {}
39
      }
40
    } else {
41
      try { bar (bar (bar (9))); } catch (...) {}
42
      bar (5);
43
    }
44
  } catch (...) {
45
  }
46
}
47
 
48
int
49
main ()
50
{
51
  int i;
52
  for (i = 0; i < 10000; i++)
53
    foo ();
54
}

powered by: WebSVN 2.1.0

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