summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-06-14 08:59:40 -0400
committerJason Merrill <jason@gcc.gnu.org>2001-06-14 08:59:40 -0400
commit3ea099f17999ab6114515989ef3bcbc5086dd1d0 (patch)
tree7c3f1904152cd04cafdddcd7ed7d7c7d5ffc763f /gcc/testsuite/g++.old-deja
parent630d3d5a68bcb7dd898d5977580dcdca3906a119 (diff)
downloadgcc-3ea099f17999ab6114515989ef3bcbc5086dd1d0.tar.gz
class.c (dfs_find_final_overrider): Fix logic.
* class.c (dfs_find_final_overrider): Fix logic. * class.c (update_vtable_entry_for_fn): Uncomment optimization to use virtual thunk instead of non-virtual. (get_matching_virtual): Uncomment. * pt.c (unify): Don't recurse between the POINTER_TYPE and the OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on PARM, not ARG. From-SVN: r43372
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/override2.C9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/deduct7.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/unify8.C2
3 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/override2.C b/gcc/testsuite/g++.old-deja/g++.other/override2.C
new file mode 100644
index 00000000000..6466b7d76ef
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/override2.C
@@ -0,0 +1,9 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Jason Merrill 14 Jun 2001 <jason@redhat.com>
+
+// Test for diagnosis of missing final overrider.
+
+struct A { virtual void f (); };
+struct B1: virtual A { virtual void f (); };
+struct B2: virtual A { virtual void f (); };
+struct C: public B1, public B2 {}; // ERROR - no final overrider
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/deduct7.C b/gcc/testsuite/g++.old-deja/g++.pt/deduct7.C
new file mode 100644
index 00000000000..ec51d30878d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/deduct7.C
@@ -0,0 +1,14 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Jason Merrill 14 Jun 2001 <jason@redhat.com>
+
+// Test that deduction can add cv-quals to a pointer-to-member type.
+
+struct A;
+int A::* pi;
+
+template <typename T> void f (const T A::*) {}
+
+int main ()
+{
+ f (pi);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
index 4e2f392b64b..afe57d1cd14 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
@@ -9,10 +9,12 @@
template <typename T> void Foo (T const **);
+template <typename T> void Bar (T const * const *);
void Foo (int); // ERROR - candidate
void Foo (float); // ERROR - candidate
void baz (int **p1)
{
Foo (p1); // ERROR - no such function
+ Bar (p1); // OK
}