aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-sra.c9
2 files changed, 6 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d58cf7c..efd8d82 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-30 Martin Jambor <mjambor@suse.cz>
+
+ * tree-sra.c (type_consists_of_records_p): Do not check for trailing
+ zero sized bit-fields.
+
2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_lex_one_token): When finding a CPP_AT_NAME
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 4364713..2e6a5cb 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -815,14 +815,12 @@ create_access (tree expr, gimple stmt, bool write)
/* Return true iff TYPE is a RECORD_TYPE with fields that are either of gimple
register types or (recursively) records with only these two kinds of fields.
- It also returns false if any of these records has a zero-size field as its
- last field or has a bit-field. */
+ It also returns false if any of these records contains a bit-field. */
static bool
type_consists_of_records_p (tree type)
{
tree fld;
- bool last_fld_has_zero_size = false;
if (TREE_CODE (type) != RECORD_TYPE)
return false;
@@ -838,13 +836,8 @@ type_consists_of_records_p (tree type)
if (!is_gimple_reg_type (ft)
&& !type_consists_of_records_p (ft))
return false;
-
- last_fld_has_zero_size = tree_low_cst (DECL_SIZE (fld), 1) == 0;
}
- if (last_fld_has_zero_size)
- return false;
-
return true;
}