FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload12.C
blob61d3740ed4155552ae03a64fcd272bd4bede22b3
1 // PRMS Id: 4066
2 // Bug: g++ doesn't notice the const on reference returns.
4 struct B {
5   int foo() { return 1; }
6   int foo() const { return 0; }
7 };
9 B b_;
10 const B &b () { return b_; }
12 int main()
14   return b().foo();