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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [using27.C] - Blame information for rev 718

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/26256
2
// { dg-do run }
3
 
4
struct A
5
{
6
    typedef int type;
7
};
8
 
9
struct B
10
{
11
    typedef double type;
12
};
13
 
14
struct C : A, B
15
{
16
    using A::type;
17
    type d;
18
 
19
    void f()
20
    {
21
        type e;
22
        if (sizeof (type) != sizeof (A::type))
23
            __builtin_abort();
24
    }
25
 
26
    void g();
27
};
28
 
29
void C::g()
30
{
31
    type x;
32
    if (sizeof (type) != sizeof (A::type))
33
        __builtin_abort();
34
}
35
 
36
int main ()
37
{
38
    if (sizeof (C::type) != sizeof (A::type))
39
        __builtin_abort();
40
 
41
    if (sizeof (C::d) != sizeof (A::type))
42
        __builtin_abort();
43
 
44
    C::type x;
45
    C c;
46
    c.f();
47
    c.g();
48
}

powered by: WebSVN 2.1.0

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