OSDN Git Service

2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Jul 2005 18:29:05 +0000 (18:29 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Jul 2005 18:29:05 +0000 (18:29 +0000)
        PR C++/22358
        * g++.dg/other/pr22358.C: New test.

2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/22358
        * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.

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

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/pr22358.C [new file with mode: 0644]

index 31c93f9..e464a66 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR C++/22358
+       * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
+
 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        * call.c: Fix comment typo(s).
index 9b85a4d..e60cc8b 100644 (file)
@@ -365,7 +365,8 @@ build_base_path (enum tree_code code,
                         build2 (EQ_EXPR, boolean_type_node,
                                 current_in_charge_parm, integer_zero_node),
                         v_offset,
-                        BINFO_OFFSET (binfo));
+                        convet_to_integer (ptrdiff_type_node,
+                                           BINFO_OFFSET (binfo)));
       else
        offset = v_offset;
     }
index c390032..04dfb01 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR C++/22358
+       * g++.dg/other/pr22358.C: New test.
+
 2005-07-21  Douglas Gregor  <doug.gregor@gmail.com>
 
        PR c++/2922
diff --git a/gcc/testsuite/g++.dg/other/pr22358.C b/gcc/testsuite/g++.dg/other/pr22358.C
new file mode 100644 (file)
index 0000000..dbce0f8
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+struct a
+{
+  virtual ~a();
+};
+struct b : virtual a { };
+b a11;