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/] [reg-stack2.C] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
// PR target/9786
2
// Origin: 
3
 
4
// This used to fail on x86 because the reg-stack pass deleted
5
// an insn that could seemingly trap (but actually doesn't)
6
// without updating the CFG.
7
 
8
// { dg-do compile }
9
// { dg-options "-O2 -fnon-call-exceptions" }
10
 
11
struct D1 {
12
    float l;
13
    D1 GS() const {D1 d;float f=.299*l;d.l=f;return d;}
14
    static D1 G() {return D1();}
15
};
16
 
17
struct D2 {
18
    D1 g;
19
    D2(const D1& gi) : g(gi) {}
20
    D2 GS() const {return D2(g.GS());}
21
};
22
 
23
class A {
24
  public:
25
    virtual ~A() {}
26
};
27
 
28
class B : public A {
29
  public:
30
    B(const D2& mi);
31
    D2 fm;
32
};
33
 
34
B::B(const D2 &mi) : fm(mi.GS()) {}

powered by: WebSVN 2.1.0

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