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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [cfg2.C] - Blame information for rev 856

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

Line No. Rev Author Line
1 149 jeremybenn
// PR optimization/12215
2
// Origin: 
3
// Reduced testcase by Wolfgang Bangerth 
4
 
5
// This used to fail because the CSE pass destroyed the CFG in presence
6
// of trapping loads, which led to the deletion of basic blocks.
7
 
8
// { dg-do compile }
9
// { dg-options "-O2 -fno-gcse -fnon-call-exceptions" }
10
 
11
 
12
struct B {
13
  ~B() throw() {}
14
};
15
 
16
struct X {
17
  X(const char*, const B&);
18
  ~X() {}
19
};
20
 
21
bool m();
22
void f(int &i, float &arg0);
23
 
24
void g (const char **argv) {
25
  float val;
26
  int i = 1;
27
 
28
  try {
29
    while ( i < 1 )
30
      {
31
        X arg(argv[i], B());
32
        if (m())
33
          throw(0);
34
 
35
        f(i, val);
36
      }
37
  } catch (...) {}
38
}

powered by: WebSVN 2.1.0

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