OSDN Git Service

2007-04-24 Douglas Gregor <doug.gregor@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / cvt4.C
1 // { dg-do run  }
2 // GROUPS passed conversions
3 // cvt file
4 // Message-Id: <9308091213.AA11572@emmy.Mathematik.Uni-Dortmund.DE>
5 // From: Michael Strauch <strauch@emmy.mathematik.uni-dortmund.de>
6 // Subject: Bug in GCC 2.4.5
7 // Date: Mon, 9 Aug 93 14:13:50 MESZ
8
9 extern "C" int printf (const char *, ...);
10
11 int destruct = 2;
12
13   class Test{
14   protected:
15      long x;
16   public:
17      Test(){;}
18      Test(long l) {x=l;}
19      ~Test() {if (--destruct == 0) printf ("PASS\n");}
20   };
21
22 int main()
23   {
24      long i=1;
25      Test t;
26
27      t=(Test)i;
28   }