From: Jakub Jelinek Date: Fri, 5 Dec 2008 16:57:08 +0000 (+0100) Subject: tree-sra.c (sra_explode_bitfield_assignment): Always call unsigned_type_for... X-Git-Tag: releases/gcc-4.4.0~1346 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d95ef974eece42ec7423bd57760db4286e3d19c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f47e6a9a63f..0b9eb7094e46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2008-12-05 Jakub Jelinek + * 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 diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 3225d1038548..8cada854094c 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -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) {