From 4dbc1f5c950e28b78db98ca08d90bd18adc1d8d1 Mon Sep 17 00:00:00 2001
From: Nathanael Nerode <neroden@gcc.gnu.org>
Date: Fri, 3 Jan 2003 02:13:46 +0000
Subject: [PATCH] * g++.dg/lookup/two-stage1.C: New test.

From-SVN: r60814
---
 gcc/testsuite/ChangeLog                  |  4 ++++
 gcc/testsuite/g++.dg/lookup/two-stage1.C | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/lookup/two-stage1.C

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 56aa24d5ff65..daec05e83396 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/lookup/two-stage1.C b/gcc/testsuite/g++.dg/lookup/two-stage1.C
new file mode 100644
index 000000000000..db7117656a9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/two-stage1.C
@@ -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)
+}
-- 
GitLab