aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-02-02 00:14:41 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-02-02 00:14:41 +0000
commitdfd48d76f76f8e2e0a973e93f0d96f18bd827476 (patch)
treea1c4390a7d9e71c0473bdd89244fde668272cb52 /gcc/objc/objc-act.c
parent4a23409e6f5915715f8831b28f3b72b3ce69c3bc (diff)
downloadgcc-dfd48d76f76f8e2e0a973e93f0d96f18bd827476.zip
gcc-dfd48d76f76f8e2e0a973e93f0d96f18bd827476.tar.gz
gcc-dfd48d76f76f8e2e0a973e93f0d96f18bd827476.tar.bz2
c-decl.c, [...]: Revert bitfield patch.
* 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. From-SVN: r49420
Diffstat (limited to 'gcc/objc/objc-act.c')
-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 91b2223..0a57d65b 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);
}