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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [rv8p.C] - Blame information for rev 378

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// I, Howard Hinnant, hereby place this code in the public domain.
2
 
3
// Test overload resolution among reference types
4
 
5
// { dg-do compile }
6
// { dg-options "-std=c++0x" }
7
 
8
template  struct sa;
9
template <> struct sa {};
10
 
11 378 julius
struct one   {long x[1];};
12
struct two   {long x[2];};
13
struct three {long x[3];};
14
struct four  {long x[4];};
15
struct five  {long x[5];};
16
struct six   {long x[6];};
17
struct seven {long x[7];};
18
struct eight {long x[8];};
19 301 jeremybenn
 
20
struct A
21
{
22
    A();
23
    A(const volatile A&&);
24
};
25
 
26
               A    source();
27
const          A  c_source();
28
      volatile A  v_source();
29
const volatile A cv_source();
30
 
31
// 8 at a time
32
 
33
one   sink_8_12345678(               A&);
34
two   sink_8_12345678(const          A&);
35
three sink_8_12345678(volatile       A&);
36
four  sink_8_12345678(const volatile A&);
37
five  sink_8_12345678(               A&&);
38
six   sink_8_12345678(const          A&&);
39
seven sink_8_12345678(volatile       A&&);
40
eight sink_8_12345678(const volatile A&&);
41
 
42
int test8_12345678()
43
{
44
                   A a;
45
    const          A ca = a;
46
          volatile A va;
47
    const volatile A cva = a;
48 378 julius
    sa t1;
49
    sa t2;
50
    sa t3;
51
    sa t4;
52
    sa t5;
53
    sa t6;
54
    sa t7;
55
    sa t8;
56 301 jeremybenn
    return 0;
57
}
58
 
59
int main()
60
{
61
    return test8_12345678();
62
}

powered by: WebSVN 2.1.0

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