aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/copy1.C
blob: 38242fbb8be8dcd5f74323a92ce8b6cea2c1aa78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// GROUPS passed copy-ctors
extern "C" void printf (char *, ...);
int count = 0;

class C {
public:
  C (int) { count++; }
  operator int () { return 0; }
};


main ()
{
  C c1 (1);
  C c2 (c1);

  if (count != 1)
    printf ("FAIL\n");
  else
    printf ("PASS\n");
}