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
39 lines
662 B
C
39 lines
662 B
C
// GROUPS passed initialization
|
|
// p2766: Make sure that members are initialized in order of declaration
|
|
// in the class, not in order of specification in the mem-initializer list.
|
|
|
|
extern "C" int printf (const char *, ...);
|
|
extern "C" void exit (int);
|
|
|
|
int count = 0;
|
|
|
|
void die () { printf ("FAIL\n"); exit (1); }
|
|
|
|
class bar1 {
|
|
public:
|
|
bar1 (int) { if (count != 0) die (); count = 1; }
|
|
};
|
|
|
|
class bar2
|
|
{
|
|
public:
|
|
bar2 (int) { if (count != 1) die (); count = 2; }
|
|
};
|
|
|
|
class foo
|
|
{
|
|
public:
|
|
bar1 a;
|
|
bar2 b;
|
|
foo (int, int);
|
|
};
|
|
|
|
// bar1 should get built before bar2
|
|
foo::foo (int x, int y) : b(x), a(y) {}
|
|
|
|
int main()
|
|
{
|
|
foo f (1, 2);
|
|
printf ("PASS\n");
|
|
}
|