Commit 7c08df6c by Jason Merrill Committed by Jason Merrill

re PR c++/42837 (FAIL: g++.dg/abi/packed1.C execution test)

	PR c++/42837
	* class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.

From-SVN: r156885
parent 8154a826
2010-02-18 Jason Merrill <jason@redhat.com>
PR c++/42837
* class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
PR c++/43108
* typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
C build_binary_op.
......
......@@ -4554,6 +4554,8 @@ create_vtable_ptr (tree t, tree* virtuals_p)
DECL_ARTIFICIAL (field) = 1;
DECL_FIELD_CONTEXT (field) = t;
DECL_FCONTEXT (field) = t;
if (TYPE_PACKED (t))
DECL_PACKED (field) = 1;
TYPE_VFIELD (t) = field;
......
2010-02-18 Jason Merrill <jason@redhat.com>
PR c++/42837
* g++.dg/abi/packed1.C: Add expected warning.
PR c++/43108
* g++.dg/torture/dg-torture.exp: Run c-c++-common torture tests.
* gcc.dg/torture/dg-torture.exp: Likewise.
......
......@@ -4,7 +4,7 @@
extern "C" void abort ();
struct INNER {
struct INNER { // { dg-warning "inefficient.*vptr" "" { target ia64-*-* hppa*-*-* } }
virtual int foo() const { return 1; }
} __attribute__ ((packed));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment