aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@alumni.carnegiemellon.edu>2001-09-07 08:54:32 +0000
committerRichard Henderson <rth@gcc.gnu.org>2001-09-07 01:54:32 -0700
commit6a9f67271e36408566367fee6cdff374b85550ed (patch)
tree1e788927b81a47a45083c0dbbb5b39a39a643941 /gcc/stor-layout.c
parentb5f20931962d4ef52f2ff80891a7feb74e6811be (diff)
downloadgcc-6a9f67271e36408566367fee6cdff374b85550ed.zip
gcc-6a9f67271e36408566367fee6cdff374b85550ed.tar.gz
gcc-6a9f67271e36408566367fee6cdff374b85550ed.tar.bz2
typeck.c (java_array_type_length, [...]): Represent empty arrays by NULL index.
* java/typeck.c (java_array_type_length, build_prim_array_type): Represent empty arrays by NULL index. * stor-layout.c (compute_record_mode): Check DECL_SIZE is set. From-SVN: r45460
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 3a4f998..e145b97 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1110,6 +1110,7 @@ compute_record_mode (type)
|| (TYPE_MODE (TREE_TYPE (field)) == BLKmode
&& ! TYPE_NO_FORCE_BLK (TREE_TYPE (field)))
|| ! host_integerp (bit_position (field), 1)
+ || DECL_SIZE (field) == 0
|| ! host_integerp (DECL_SIZE (field), 1))
return;