2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / cvt4.C
blobb66c3d41aa308a8a542c0762560227679ebe0a7f
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
9 extern "C" int printf (const char *, ...);
11 int destruct = 2;
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   };
22 int main()
23   {
24      long i=1;
25      Test t;
27      t=(Test)i;
28   }