summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2010-09-30 14:31:21 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2010-09-30 14:31:21 +0200
commit37ccfc46e8f0005bb8a3e08c189b95ca9948059a (patch)
tree8b3285d63d9ea1f41b9dbfb013f72f3c002fa52e /gcc/tree-sra.c
parent0d0da792aa7fb596c5afc013a64bef87bf8d045f (diff)
downloadgcc-37ccfc46e8f0005bb8a3e08c189b95ca9948059a.tar.gz
tree-sra.c (type_consists_of_records_p): Do not check for trailing zero sized bit-fields.
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. From-SVN: r164750
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 4364713ca57..2e6a5cb61df 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;
}