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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [ctors19.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed constructors
3
// ctor file
4
// From: mkohtala@vinkku.hut.fi
5
// Date: Tue, 5 Oct 1993 19:31:16 +0200
6
// Message-Id: <199310051731.AA12260@lk-hp-11.hut.fi>
7
// Subject: Nested class constructor calling bug
8
 
9
class X
10
{
11
  public:
12
    class Y
13
    {
14
      public:
15
        Y(int i) : a(i) {}
16
        int a;
17
    };
18
    static void f(Y y);
19
};
20
 
21
void X::f(X::Y y)
22
{
23
}
24
 
25
int
26
main()
27
{
28
    X::Y y = X::Y(1);   // Tries to call ctor Y instead of X::Y
29
    X::f(X::Y(2));      // Tries to call Y instead of X::Y
30
 
31
    return 0;
32
}
33
 

powered by: WebSVN 2.1.0

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