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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// { dg-options "-w" }
3
// GROUPS passed constructors
4
// ctors file
5
// Message-Id: 
6
// From: Alf-Christian Achilles 
7
// Subject: g++ 2.3.1 rejects initialization with object of derived class
8
// Date: 25 Nov 92 19:21:23
9
 
10
extern "C" int printf (const char *, ...);
11
 
12
class A {
13
public:
14
  virtual void foo() {};
15
};
16
 
17
class B : public A {
18
public:
19
  void foo() {};
20
};
21
 
22
main ()
23
{
24
  B b;
25
  A a = b;  //unjustified error: unexpected argument to constructor `A'
26
  printf ("PASS\n");
27
}
28
 

powered by: WebSVN 2.1.0

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