svn merge -r102224:107263 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / two-stage1.C
blobdb7117656a9a866f0c2e3764f00c171fb9f490ee
1 /* PR c++/2437 */
2 /* { dg-do run } */
4 // Test of two-stage name lookup.
6 int g(double) { return 0; }
7  
8 template <class T> struct X
10   int f() { return g(2); } // should call g(double)
13 inline int g(int) { return 1; }
15 int main()
17   return X<int>().f(); // should call g(double), but used to call g(int)