* g++.dg/lookup/two-stage1.C: New test.

From-SVN: r60814
This commit is contained in:
Nathanael Nerode 2003-01-03 02:13:46 +00:00
parent 24c0ef372c
commit 4dbc1f5c95
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2003-01-02 Nathanael Nerode <neroden@gcc.gnu.org>
* g++.dg/lookup/two-stage1.C: New test.
2003-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.bugs/900404_04.C: Remove XFAIL.

View File

@ -0,0 +1,18 @@
/* PR c++/2437 */
/* { dg-do run } */
// Test of two-stage name lookup.
int g(double) { return 0; }
template <class T> struct X
{
int f() { return g(2); } // should call g(double)
};
inline int g(int) { return 1; }
int main()
{
return X<int>().f(); // should call g(double), but used to call g(int)
}