diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-03-27 00:09:30 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-03-27 00:09:30 +0000 |
commit | 6e1b3420c61f8aaec527cf2b2c507f93ef07b8c0 (patch) | |
tree | 0f14c62ec9d8b4f02199b2e9089cc3c99fd4fb0b /gcc/tree.c | |
parent | 3e9608a53fad38713e2b8f52be7121e460f1627a (diff) | |
download | gcc-6e1b3420c61f8aaec527cf2b2c507f93ef07b8c0.zip gcc-6e1b3420c61f8aaec527cf2b2c507f93ef07b8c0.tar.gz gcc-6e1b3420c61f8aaec527cf2b2c507f93ef07b8c0.tar.bz2 |
tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF.
* tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF.
From-SVN: r133624
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -5956,11 +5956,6 @@ build_complex_type (tree component_type) If FOR_TYPE is nonzero, we return a value which, if converted to type FOR_TYPE, would be equivalent to converting OP to type FOR_TYPE. - If FOR_TYPE is nonzero, unaligned bit-field references may be changed to the - narrowest type that can hold the value, even if they don't exactly fit. - Otherwise, bit-field references are changed to a narrower type - only if they can be fetched directly from memory in that type. - OP must have integer, real or enumeral type. Pointers are not allowed! There are some cases where the obvious value we could return @@ -6035,38 +6030,6 @@ get_unwidened (tree op, tree for_type) } } - if (TREE_CODE (op) == COMPONENT_REF - /* Since type_for_size always gives an integer type. */ - && TREE_CODE (type) != REAL_TYPE - && TREE_CODE (type) != FIXED_POINT_TYPE - /* Don't crash if field not laid out yet. */ - && DECL_SIZE (TREE_OPERAND (op, 1)) != 0 - && host_integerp (DECL_SIZE (TREE_OPERAND (op, 1)), 1)) - { - unsigned int innerprec - = tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1); - int unsignedp = (DECL_UNSIGNED (TREE_OPERAND (op, 1)) - || TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); - type = lang_hooks.types.type_for_size (innerprec, unsignedp); - - /* We can get this structure field in the narrowest type it fits in. - If FOR_TYPE is 0, do this only for a field that matches the - narrower type exactly and is aligned for it - The resulting extension to its nominal type (a fullword type) - must fit the same conditions as for other extensions. */ - - if (type != 0 - && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (op))) - && (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1))) - && (! uns || final_prec <= innerprec || unsignedp)) - { - win = build3 (COMPONENT_REF, type, TREE_OPERAND (op, 0), - TREE_OPERAND (op, 1), NULL_TREE); - TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op); - TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op); - } - } - return win; } |