PR c++/28253
* class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
for thunks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122490
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-03-02 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/28253
+ * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
+ for thunks.
+
2007-03-02 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
fixed_offset, virtual_offset);
}
else
- gcc_assert (!DECL_THUNK_P (fn));
+ gcc_assert (DECL_INVALID_OVERRIDER_P (overrider_target) ||
+ !DECL_THUNK_P (fn));
/* Assume that we will produce a thunk that convert all the way to
the final overrider, and not to an intermediate virtual base. */
+2007-03-02 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/28253
+ * g++.dg/inherit/covariant16.C: New test.
+
2007-03-02 Geoffrey Keating <geoffk@apple.com>
* g++.dg/other/darwin-minversion-1.C: New.
--- /dev/null
+/* PR c++/28253 This used to ICE. */
+/* { dg-do "compile" } */
+
+struct A
+{
+ virtual A* foo();
+};
+
+struct B : virtual A
+{
+ virtual B* foo(); /* { dg-error "overriding" } */
+};
+
+struct C : B
+{
+ virtual C& foo(); /* { dg-error "conflicting return type" } */
+};