3f552d62f4
* g++.old-deja/g++.brendan/array1.C: Modify explicit external libc references to printf & atoi to conform to ANSI standard. * g++.old-deja/g++.brendan/code-gen1.C: Likewise. * g++.old-deja/g++.brendan/code-gen2.C: Likewise. * g++.old-deja/g++.brendan/code-gen3.C: Likewise. * g++.old-deja/g++.brendan/code-gen4.C: Likewise. * g++.old-deja/g++.brendan/code-gen6.C: Likewise. * g++.old-deja/g++.brendan/complex1.C: Likewise. * g++.old-deja/g++.brendan/copy1.C: Likewise. * g++.old-deja/g++.brendan/copy2.C: Likewise. * g++.old-deja/g++.brendan/copy3.C: Likewise. * g++.old-deja/g++.brendan/copy4.C: Likewise. * g++.old-deja/g++.brendan/copy5.C: Likewise. * g++.old-deja/g++.brendan/copy6.C: Likewise. * g++.old-deja/g++.brendan/copy7.C: Likewise. * g++.old-deja/g++.brendan/copy8.C: Likewise. * g++.old-deja/g++.brendan/crash11.C: Likewise. * g++.old-deja/g++.brendan/crash14.C: Likewise. * g++.old-deja/g++.brendan/ctors1.C: Likewise. * g++.old-deja/g++.brendan/ctors2.C: Likewise. * g++.old-deja/g++.brendan/delete2.C: Likewise. * g++.old-deja/g++.brendan/dtors1.C: Likewise. * g++.old-deja/g++.brendan/dtors2.C: Likewise. * g++.old-deja/g++.brendan/dtors3.C: Likewise. * g++.old-deja/g++.brendan/eh1.C: Likewise. * g++.old-deja/g++.brendan/groff1.C: Likewise. * g++.old-deja/g++.brendan/init3.C: Likewise. * g++.old-deja/g++.brendan/misc12.C: Likewise. * g++.old-deja/g++.brendan/misc7.C: Likewise. * g++.old-deja/g++.brendan/new2.C: Likewise. * g++.old-deja/g++.brendan/operators4.C: Likewise. * g++.old-deja/g++.brendan/operators5.C: Likewise. * g++.old-deja/g++.brendan/overload2.C: Likewise. * g++.old-deja/g++.brendan/overload7.C: Likewise. * g++.old-deja/g++.brendan/redecl2.C: Likewise. * g++.old-deja/g++.brendan/reference1.C: Likewise. * g++.old-deja/g++.brendan/sizeof5.C: Likewise. * g++.old-deja/g++.brendan/template24.C: Likewise. * g++.old-deja/g++.brendan/template3.C: Likewise. * g++.old-deja/g++.brendan/vtables1.C: Likewise. * g++.old-deja/g++.jason/inline3.C: Likewise. * g++.old-deja/g++.jason/opeq.C: Likewise. * g++.old-deja/g++.law/arg5.C: Likewise. * g++.old-deja/g++.law/arm7.C: Likewise. * g++.old-deja/g++.law/ctors11.C: Likewise. * g++.old-deja/g++.law/cvt8.C: Likewise. * g++.old-deja/g++.law/init9.C: Likewise. * g++.old-deja/g++.law/refs4.C: Likewise. * g++.old-deja/g++.law/template2.C: Likewise. * g++.old-deja/g++.law/visibility24.C: Likewise. * g++.old-deja/g++.law/vtable3.C: Likewise. * g++.old-deja/g++.mike/asm2.C: Likewise. * g++.old-deja/g++.mike/eh1.C: Likewise. * g++.old-deja/g++.mike/misc1.C: Likewise. * g++.old-deja/g++.mike/misc13.C: Likewise. * g++.old-deja/g++.mike/misc14.C: Likewise. * g++.old-deja/g++.mike/ns12.C: Likewise. * g++.old-deja/g++.mike/p1248.C: Likewise. * g++.old-deja/g++.mike/p3708.C: Likewise. * g++.old-deja/g++.mike/p3708a.C: Likewise. * g++.old-deja/g++.mike/p3708b.C: Likewise. * g++.old-deja/g++.mike/p646.C: Likewise. * g++.old-deja/g++.mike/p700.C: Likewise. * g++.old-deja/g++.mike/p783.C: Likewise. * g++.old-deja/g++.mike/p783a.C: Likewise. * g++.old-deja/g++.mike/p783b.C: Likewise. * g++.old-deja/g++.mike/p786.C: Likewise. * g++.old-deja/g++.mike/p789.C: Likewise. * g++.old-deja/g++.mike/p789a.C: Likewise. * g++.old-deja/g++.mike/p807a.C: Likewise. * g++.old-deja/g++.other/delete3.C: Likewise. * g++.old-deja/g++.other/dyncast1.C: Likewise. * g++.old-deja/g++.other/dyncast2.C: Likewise. * g++.old-deja/g++.other/dyncast3.C: Likewise. * g++.old-deja/g++.other/empty1.C: Likewise. * g++.old-deja/g++.other/temporary1.C: Likewise. * g++.old-deja/g++.pt/memtemp14.C: Likewise. * g++.old-deja/g++.pt/t16.C: Likewise. * g++.old-deja/g++.pt/tiemann2.C: Likewise. From-SVN: r31204
24 lines
338 B
C
24 lines
338 B
C
// Origin: Mark Mitchell <mark@codesourcery.com>
|
|
|
|
extern "C" void abort();
|
|
extern "C" int printf (const char *, ...);
|
|
|
|
int i;
|
|
|
|
struct A;
|
|
|
|
struct A* as[10];
|
|
|
|
struct A {
|
|
A () { as[i++] = this; }
|
|
A (const A&) { as[i++] = this; }
|
|
~A() { if (i == 0 || as[--i] != this) abort(); }
|
|
};
|
|
|
|
A f() { return A(); }
|
|
|
|
int main ()
|
|
{
|
|
A a (f ());
|
|
}
|