aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-07-25 19:43:15 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-07-25 19:43:15 +0000
commitea814c6675874dae704d3ee33b7146c3f5132688 (patch)
treebc5598b0791be6690f4675fc60b70ba3484f2c18 /gcc/fold-const.c
parent2514d7f1ffa6049efcf198c373c4d13cef266b03 (diff)
downloadgcc-ea814c6675874dae704d3ee33b7146c3f5132688.zip
gcc-ea814c6675874dae704d3ee33b7146c3f5132688.tar.gz
gcc-ea814c6675874dae704d3ee33b7146c3f5132688.tar.bz2
expr.c (expand_expr_real_1): Do not expand operand #1 and #2 of BIT_FIELD_REF for ignored results.
* expr.c (expand_expr_real_1): Do not expand operand #1 and #2 of BIT_FIELD_REF for ignored results. * fold-const.c (fold_ternary_loc) <BIT_FIELD_REF>: Check that the CONSTRUCTOR has vector type before using vector accessors on it. * gimplify.c (gimplify_compound_lval): Do not gimplify operand #1 and #2 of BIT_FIELD_REF. (gimplify_expr) <BIT_FIELD_REF>: Likewise. * tree-nested.c (convert_nonlocal_reference_op) <BIT_FIELD_REF>: Do not process operand #1 and #2. (convert_local_reference_op): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Remove superfluous breaks throughout. <BIT_FIELD_REF>: Reuse operand #1 and #2 directly. * tree.c (stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. (UPDATE_FLAGS): Do not consider operand #2 of BIT_FIELD_REF. (build6_stat): Delete. * tree.h (build6_stat, build6, build6_stat_loc, build6_loc): Likewise. ada/ * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. From-SVN: r189864
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index a491499..c136960 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -14043,7 +14043,8 @@ fold_ternary_loc (location_t loc, enum tree_code code, tree type,
case BIT_FIELD_REF:
if ((TREE_CODE (arg0) == VECTOR_CST
- || TREE_CODE (arg0) == CONSTRUCTOR)
+ || (TREE_CODE (arg0) == CONSTRUCTOR
+ && TREE_CODE (TREE_TYPE (arg0)) == VECTOR_TYPE))
&& (type == TREE_TYPE (TREE_TYPE (arg0))
|| (TREE_CODE (type) == VECTOR_TYPE
&& TREE_TYPE (type) == TREE_TYPE (TREE_TYPE (arg0)))))