aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/operators16.C
blob: 384c4e9c28676e01fb3731d5c678b04a08b4cf9a (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
29
// GROUPS passed operators
// copy file
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
// Date:     Thu, 29 Apr 93 20:53:07 EST
// Subject:  4 bugs in g++ 2.3.3
// Message-ID: <9304291053.AA00090@mencon>

#include <stdio.h>

int pass = 0;
struct A {
        A(void) {}
        A(const A& a) { ; }
        A& operator = (const A& a) { pass = 1; }
};

struct B {
        B(const A& aa) { B::a = aa; }
        A a;
};

main(void)
{
        B(A());
	if (pass)
		printf ("PASS\n");
	else
		printf ("FAIL\n");
}