OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [ctors5.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-fshow-column" }
3
// GROUPS passed constructors
4
// ctors file
5
// Subject: bug in handling static const object of the enclosing class
6
// Date: Tue, 1 Sep 92 10:38:44 EDT
7
 
8
class X
9
{ // { dg-message "1:X::X\\(const X&\\)" } implicit constructor
10
  private:
11
    int x;
12
  public:
13
    static const X x0;
14
    X( int );
15
};
16
 
17
class Y // { dg-error "1:new types may not be defined in a return type" "err" }
18
        // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'Y'\\)" "note" { target *-*-* } 17 }
19
{
20
  private:
21
    X xx;
22
  public:
23
    Y();
24
}
25
X::X( int xi ) // { dg-error "14:return type specification for constructor invalid" "err" }
26
// { dg-message "1:candidates are: X::X\\(int\\)" "note" { target *-*-* } 25 }
27
{
28
    x = xi;
29
}
30
 
31
const X X::x0( 0 );
32
 
33
Y::Y() // { dg-error "6:no matching function for call to 'X::X\\(\\)'" }
34
{
35
    xx = X::x0;
36
}

powered by: WebSVN 2.1.0

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