OSDN Git Service

* search.c (lookup_conversions_r): Fix a pasto.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2006 08:01:02 +0000 (08:01 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2006 08:01:02 +0000 (08:01 +0000)
* g++.dg/parse/lookup5.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109877 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/search.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/lookup5.C [new file with mode: 0644]

index da860eb..f7201ba 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * search.c (lookup_conversions_r): Fix a pasto.
+
 2006-01-17  Eric Christopher  <echristo@apple.com>
 
        * call.c (convert_like_real): When issuing conversion
index 090510b..90e88d6 100644 (file)
@@ -2355,7 +2355,7 @@ lookup_conversions_r (tree binfo,
     {
       parent_tpl_convs = tree_cons (binfo, my_tpl_convs, parent_tpl_convs);
       if (virtual_depth)
-       TREE_STATIC (parent_convs) = 1;
+       TREE_STATIC (parent_tpl_convs) = 1;
     }
 
   child_convs = other_convs;
index dc5c57a..61145bc 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * g++.dg/parse/lookup5.C: New test.
+
 2006-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/25697
diff --git a/gcc/testsuite/g++.dg/parse/lookup5.C b/gcc/testsuite/g++.dg/parse/lookup5.C
new file mode 100644 (file)
index 0000000..afdf023
--- /dev/null
@@ -0,0 +1,26 @@
+// { dg-do compile }
+
+struct A {};
+
+template <class T> struct B
+{
+  T a, b;
+  B() {}
+  B(T x, T y) : a(x), b(y) {}
+  template <class U> operator B<U> () const
+  { return B<U>((U)(this->a), (U)(this->b)); }
+};
+
+template <class T> struct C : public B<int>
+{
+  T *c;
+  inline T & operator *() { return *c; }
+};
+
+template <class T> struct D : virtual public C<T> { };
+
+void
+foo (D<A> x)
+{
+  *x;
+}