summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/partial3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/partial3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/partial3.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/partial3.C b/gcc/testsuite/g++.old-deja/g++.pt/partial3.C
new file mode 100644
index 000000000..f62f91566
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/partial3.C
@@ -0,0 +1,17 @@
+// { dg-do run }
+// Test that partial ordering works between conversion ops from different
+// classes.
+// From Jason Merrill <jason@cygnus.com>
+
+struct A {
+ template <class T> operator T*() { return 0; }
+};
+struct B : public A {
+ template <class T> operator T();
+};
+
+int main()
+{
+ B b;
+ (void*) b;
+}