repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
reflect: canonicalize types returned by StructOf() and friends
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.brendan
/
copy7.C
blob
8fbec3384ac77179146bd9b268a500ca4fa7ece3
1
// { dg-do run }
2
// GROUPS passed copy-ctors
3
extern "C" int printf (const char *, ...);
4
extern "C" void exit (int);
5
6
void die () { printf ("FAIL\n"); exit (1); }
7
8
class B {
9
public:
10
B() {}
11
B(const B &) { printf ("PASS\n"); exit (0); }
12
private:
13
int x;
14
};
15
16
class A : public B {
17
public:
18
A() {}
19
20
A(const B &) { printf ("FAIL\n"); exit (1); }
21
};
22
23
int
24
main()
25
{
26
A a;
27
A b(a);
28
29
printf ("FAIL\n");
30
return 1;
31
}