OSDN Git Service

Scan "lea\[lq\]?\[ \t\]" instead of "lea\[ \t\]".
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / ctors4.C
1 // { dg-do run  }
2 // { dg-options "-w" }
3 // GROUPS passed constructors
4 // ctors file
5 // Message-Id: <ACHILLES.92Nov25192123@i90s8.ira.uka.de>
6 // From: Alf-Christian Achilles <achilles@ira.uka.de>
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