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
2013-05-29 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
ref4.C
blob
6b65d9925ab119e736ce2e93823b7edef2acfa2b
1
// { dg-do run }
2
3
int c;
4
5
struct Base {
6
Base() {}
7
Base(const Base &) { ++c; }
8
Base & operator = (const Base &);
9
};
10
11
struct Derived : public Base {};
12
13
const Base &b = Derived();
14
15
int main()
16
{
17
return c; // No copies should be required.
18
}