Commit 37ccfc46 by Martin Jambor Committed by Martin Jambor

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
parent 0d0da792
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> 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_lex_one_token): When finding a CPP_AT_NAME * c-parser.c (c_lex_one_token): When finding a CPP_AT_NAME
...@@ -815,14 +815,12 @@ create_access (tree expr, gimple stmt, bool write) ...@@ -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 /* 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. 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 It also returns false if any of these records contains a bit-field. */
last field or has a bit-field. */
static bool static bool
type_consists_of_records_p (tree type) type_consists_of_records_p (tree type)
{ {
tree fld; tree fld;
bool last_fld_has_zero_size = false;
if (TREE_CODE (type) != RECORD_TYPE) if (TREE_CODE (type) != RECORD_TYPE)
return false; return false;
...@@ -838,13 +836,8 @@ type_consists_of_records_p (tree type) ...@@ -838,13 +836,8 @@ type_consists_of_records_p (tree type)
if (!is_gimple_reg_type (ft) if (!is_gimple_reg_type (ft)
&& !type_consists_of_records_p (ft)) && !type_consists_of_records_p (ft))
return false; 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; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment