summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-02 00:14:41 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-02 00:14:41 +0000
commitb9d8dcc9655151bffedb8c30be8a5e9ddbd301fb (patch)
treea1c4390a7d9e71c0473bdd89244fde668272cb52 /gcc/objc
parentca29ad57251b4265ba7184d79fed99686e7c02f4 (diff)
downloadgcc-b9d8dcc9655151bffedb8c30be8a5e9ddbd301fb.tar.gz
* c-decl.c, tree.c, tree.h, objc/objc-act.c: Revert bitfield
patch. * gcc.dg/bitfld-1.c: Update. * gcc.dg/bitfld-2.c: Update. * gcc.c-torture/execute/bitfld-1.x: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 91b2223cf10..0a57d65b2ef 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -2393,6 +2393,13 @@ objc_copy_list (list, head)
while (list)
{
tail = copy_node (list);
+
+ /* The following statement fixes a bug when inheriting instance
+ variables that are declared to be bitfields. finish_struct
+ expects to find the width of the bitfield in DECL_INITIAL. */
+ if (DECL_BIT_FIELD (tail) && DECL_INITIAL (tail) == 0)
+ DECL_INITIAL (tail) = DECL_SIZE (tail);
+
newlist = chainon (newlist, tail);
list = TREE_CHAIN (list);
}