]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
New test from PR #3242
authorGabriel Dos Reis <gdr@gcc.gnu.org>
Sat, 11 Aug 2001 20:35:58 +0000 (20:35 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Sat, 11 Aug 2001 20:35:58 +0000 (20:35 +0000)
From-SVN: r44808

gcc/testsuite/g++.dg/lookup/using.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/lookup/using.C b/gcc/testsuite/g++.dg/lookup/using.C
new file mode 100644 (file)
index 0000000..2189d98
--- /dev/null
@@ -0,0 +1,23 @@
+// { dg-do compile }
+
+struct X { };
+struct Y { };
+struct Z { };
+
+struct Base {
+  X f() { return X(); }
+  Y f() const { return Y(); }
+};
+
+struct Derived : Base {
+  using Base::f;
+  Z f(int) { return Z(); }
+};
+
+int main()
+{
+  Derived d;
+  X x = d.f();
+}
+
+