summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/ctors1.C
blob: eaf487159d839fcdf0a26be1142c5dcdae8a162e (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
// GROUPS passed constructors
// Check that global level object constructors get called.

extern "C" void printf (char *, ...); 

struct base {
	int f1;
	int f2;
	base (int arg1, int arg2);
};


base global_base(0x55, 0xff);

int main ()
{
	if ((global_base.f1 != 0x55) || (global_base.f2 != 0xff))
	  printf ("FAIL\n");
	else
	  printf ("PASS\n");
}

base::base(int arg1, int arg2)
{
	f1 = arg1;
	f2 = arg2;
};