tree-sra.c (sra_explode_bitfield_assignment): Always call unsigned_type_for...

* tree-sra.c (sra_explode_bitfield_assignment): Always
	call unsigned_type_for, if the precision is higher than
	needed, call build_nonstandard_integer_type.

From-SVN: r142483
This commit is contained in:
Jakub Jelinek 2008-12-05 17:57:08 +01:00 committed by Jakub Jelinek
parent 997f78fb1d
commit 2d95ef974e
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,9 @@
2008-12-05 Jakub Jelinek <jakub@redhat.com>
* tree-sra.c (sra_explode_bitfield_assignment): Always
call unsigned_type_for, if the precision is higher than
needed, call build_nonstandard_integer_type.
PR debug/38367
* function.c (assign_parm_find_stack_rtl): If promoted_mode
is wider than DECL_MODE, adjust MEM_OFFSET (stack_parm) for

View File

@ -3013,11 +3013,9 @@ sra_explode_bitfield_assignment (tree var, tree vpos, bool to_var,
infld = fld->replacement;
type = TREE_TYPE (infld);
type = unsigned_type_for (TREE_TYPE (infld));
if (TYPE_PRECISION (type) != TREE_INT_CST_LOW (flen))
type = lang_hooks.types.type_for_size (TREE_INT_CST_LOW (flen), 1);
else
type = unsigned_type_for (type);
type = build_nonstandard_integer_type (TREE_INT_CST_LOW (flen), 1);
if (TREE_CODE (infld) == BIT_FIELD_REF)
{