From 6e1b3420c61f8aaec527cf2b2c507f93ef07b8c0 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 27 Mar 2008 00:09:30 +0000 Subject: [PATCH] tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF. * tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF. From-SVN: r133624 --- gcc/ChangeLog | 4 ++++ gcc/tree.c | 37 ------------------------------------- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58724be36e8..f62d553bba2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-03-26 Eric Botcazou + + * tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF. + 2008-03-26 Andreas Schwab * doc/invoke.texi: Fix use of @item vs. @itemx. diff --git a/gcc/tree.c b/gcc/tree.c index c39bccda098..2a6ebb0069b 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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; } -- 2.30.2