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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [lto/] [20091004-2_0.C] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-lto-do link }
2
// { dg-lto-options {{-fPIC -O -flto}} }
3
 
4
typedef double Real;
5
class Vector {
6
    int dimen;
7
    Real* val;
8
public:
9
    Vector& operator=(const Vector& vec);
10
    Vector(int p_dimen, Real *p_val)
11
        : dimen(p_dimen), val(p_val)    { }
12
    int dim() const;
13
};
14
class DVector : public Vector {
15
public:
16
    void reDim(int newdim);
17
    explicit DVector(const Vector& old);
18
    DVector& operator=(const Vector& vec)    {
19
        reDim(vec.dim());
20
        Vector::operator=(vec);
21
    }
22
};
23
class SLUFactor  {
24
    DVector vec;
25
    void solveRight (Vector& x, const Vector& b);
26
};
27
void SLUFactor::solveRight (Vector& x, const Vector& b) {
28
    vec = b;
29
}

powered by: WebSVN 2.1.0

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