summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 01:16:28 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 01:16:28 +0000
commitaa1d3529bbcffc39740b198cb013ef285676a17d (patch)
tree3b16b1a11a5a930310d0eeac72bfd6caab234848 /gcc/cp/class.c
parent54480b259de6c2467ff79c4f47e0d3b5404d84e5 (diff)
downloadgcc-aa1d3529bbcffc39740b198cb013ef285676a17d.tar.gz
PR c++/42837
* class.c (create_vtable_ptr): Set DECL_PACKED if type is packed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156885 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index f88914d3c22..f7e0a9307d5 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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;