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
Create embedded-5_0-branch branch for development on ARM embedded cores.
[official-gcc.git]
/
embedded-5_0-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
overload12.C
blob
b6ff7e167769711489e7c4e7a0b130cba86add11
1
// { dg-do run }
2
// PRMS Id: 4066
3
// Bug: g++ doesn't notice the const on reference returns.
4
5
struct B {
6
int foo() { return 1; }
7
int foo() const { return 0; }
8
};
9
10
B b_;
11
const B &b () { return b_; }
12
13
int main()
14
{
15
return b().foo();
16
}