* g++.dg/init/dtor1.C: New test.

From-SVN: r53033
This commit is contained in:
Mark Mitchell 2002-05-02 05:14:31 +00:00 committed by Mark Mitchell
parent 0d6d689229
commit 76ccdb3c4a
2 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-05-01 Mark Mitchell <mark@codesourcery.com>
* g++.dg/init/dtor1.C: New test.
2002-05-02 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-8.c: New.

View File

@ -0,0 +1,27 @@
// { dg-do run }
extern "C" void abort ();
int d = 2;
struct B
{
int x;
B (int i) : x (i) { }
~B () { if (d-- != x) abort (); }
};
struct A
: public B
{
A () : B (0), x1(1), x2(2) {}
B x1;
B x2;
};
int main ()
{
A a;
return 0;
}