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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr45605.C] - Blame information for rev 742

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fdump-tree-fre1" } */
3
extern "C" void abort();
4
bool destructor_called = false;
5
 
6
struct B {
7
    virtual void Run(){};
8
};
9
 
10
struct D : public B {
11
    virtual void Run()
12
      {
13
        struct O {
14
            ~O() { destructor_called = true; };
15
        } o;
16
 
17
        struct Raiser {
18
            Raiser()  throw( int ) {throw 1;};
19
        } raiser;
20
      };
21
};
22
 
23
int main() {
24
    try {
25
      D d;
26
      static_cast(d).Run();
27
    } catch (...) {}
28
 
29
    if (!destructor_called)
30
      abort ();
31
}
32
 
33
 
34
 
35
/* We should devirtualize call to D::Run */
36
/* { dg-final { scan-tree-dump-times "D::Run \\(" 1 "fre1" } } */
37
/* { dg-final { cleanup-tree-dump "fre1" } } */

powered by: WebSVN 2.1.0

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