summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/cvt4.C
blob: b66c3d41aa308a8a542c0762560227679ebe0a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do run  }
// GROUPS passed conversions
// cvt file
// Message-Id: <9308091213.AA11572@emmy.Mathematik.Uni-Dortmund.DE>
// From: Michael Strauch <strauch@emmy.mathematik.uni-dortmund.de>
// Subject: Bug in GCC 2.4.5
// Date: Mon, 9 Aug 93 14:13:50 MESZ

extern "C" int printf (const char *, ...);

int destruct = 2;

  class Test{
  protected:
     long x;
  public:
     Test(){;}
     Test(long l) {x=l;}
     ~Test() {if (--destruct == 0) printf ("PASS\n");}
  };

int main()
  {
     long i=1;
     Test t;

     t=(Test)i;
  }