* optimize.c (maybe_clone_body): Call emit_associated_thunks
after expand_or_defer_fn_1.
* g++.dg/inherit/thunk11.C: New test.
* g++.dg/inherit/thunk11.h: New file.
* g++.dg/inherit/thunk11-aux.cc: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154937
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/42256
+ * optimize.c (maybe_clone_body): Call emit_associated_thunks
+ after expand_or_defer_fn_1.
+
2009-12-02 Taras Glek <taras@mozilla.com>
* parser.c (cp_parser_class_specifier): Back out my previous change.
comdat_group = cdtor_comdat_group (fns[1], fns[0]);
DECL_COMDAT_GROUP (fns[0]) = comdat_group;
}
- emit_associated_thunks (clone);
}
/* Build the delete destructor by calling complete destructor
finish_function (0);
BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn);
if (alias)
- expand_or_defer_fn_1 (clone);
+ {
+ if (expand_or_defer_fn_1 (clone))
+ emit_associated_thunks (clone);
+ }
else
expand_or_defer_fn (clone);
first = false;
+2009-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/42256
+ * g++.dg/inherit/thunk11.C: New test.
+ * g++.dg/inherit/thunk11.h: New file.
+ * g++.dg/inherit/thunk11-aux.cc: New file.
+
2009-12-02 Richard Guenther <rguenther@suse.de>
* g++.dg/ipa/iinline-1.C: Adjust.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2" }
+
+#include "thunk11.h"
--- /dev/null
+// PR c++/42256
+// { dg-do link }
+// { dg-additional-sources "thunk11-aux.cc" }
+// { dg-options "-O2" }
+
+#include "thunk11.h"
+
+int
+main ()
+{
+}
--- /dev/null
+struct A
+{
+ A () {}
+ virtual ~A () {}
+};
+struct B
+{
+ B () {}
+ virtual ~B () {}
+};
+struct C : public A, public B
+{
+ virtual void foo ();
+ virtual ~C () {};
+};
+inline void C::foo () {}