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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/30195
2
// { dg-do run }
3
 
4
template 
5
struct A
6
{
7
    int f(int) { return 0; }
8
    int f(double) { return 1; }
9
    int f(char) { return 2; }
10
};
11
 
12
template 
13
struct B : A
14
{
15
    using A::f;
16
    int f(int) { return 3; }
17
};
18
 
19
int main()
20
{
21
    B b;
22
    if( b.f( 42 ) != 3 )
23
        __builtin_abort();
24
 
25
    if( b.f( 3.14 ) != 1 )
26
        __builtin_abort();
27
 
28
    if( b.f( 'a' ) != 2 )
29
        __builtin_abort();
30
 
31
    if( b.A::f( 42 ) != 0 )
32
        __builtin_abort();
33
}

powered by: WebSVN 2.1.0

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