aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-12-23 14:02:33 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-12-23 13:02:33 +0000
commit2614034eead349c8ae65e7f106bdce4212e9b71a (patch)
treea98bb36f52d3d1b233ad2e1e33601de24da98c8d /gcc/fold-const.c
parent9690a821226394176b4cb187641692e8caf801a5 (diff)
downloadgcc-2614034eead349c8ae65e7f106bdce4212e9b71a.zip
gcc-2614034eead349c8ae65e7f106bdce4212e9b71a.tar.gz
gcc-2614034eead349c8ae65e7f106bdce4212e9b71a.tar.bz2
re PR middle-end/17746 (ICE when building the Ada RTS)
PR middle-end/17746 * expr.c (get_inner_reference): Add 'keep_aligning' parameter. Break on aligning VIEW_CONVERT_EXPR nodes on STRICT_ALIGNMENT platforms only if keep_aligning is true. (expand_assignment): Adjust call to get_inner_reference. (expand_expr_addr_expr_1): Likewise. (expand_expr_real_1): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (loc_descriptor_from_tree_1): Likewise. * fold-const.c (optimize_bit_field_compare): Likewise. (decode_field_reference): Likewise. (split_address_to_core_and_offset): Likewise. * tree-ssa-loop-ivopts.c (split_address_cost): Likewise. * expr.h (get_inner_reference): Adjust prototype. ada/ * trans.c (Attribute_to_gnu): Adjust call to get_inner_reference. * utils2.c (build_unary_op): Likewise. From-SVN: r92549
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index d249f75..8f8624c 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -3102,7 +3102,7 @@ optimize_bit_field_compare (enum tree_code code, tree compare_type,
do anything if the inner expression is a PLACEHOLDER_EXPR since we
then will no longer be able to replace it. */
linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
- &lunsignedp, &lvolatilep);
+ &lunsignedp, &lvolatilep, false);
if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
|| offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
return 0;
@@ -3112,7 +3112,7 @@ optimize_bit_field_compare (enum tree_code code, tree compare_type,
/* If this is not a constant, we can only do something if bit positions,
sizes, and signedness are the same. */
rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode,
- &runsignedp, &rvolatilep);
+ &runsignedp, &rvolatilep, false);
if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize
|| lunsignedp != runsignedp || offset != 0
@@ -3288,7 +3288,7 @@ decode_field_reference (tree exp, HOST_WIDE_INT *pbitsize,
}
inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode,
- punsignedp, pvolatilep);
+ punsignedp, pvolatilep, false);
if ((inner == exp && and_mask == 0)
|| *pbitsize < 0 || offset != 0
|| TREE_CODE (inner) == PLACEHOLDER_EXPR)
@@ -11018,7 +11018,8 @@ split_address_to_core_and_offset (tree exp,
if (TREE_CODE (exp) == ADDR_EXPR)
{
core = get_inner_reference (TREE_OPERAND (exp, 0), &bitsize, pbitpos,
- poffset, &mode, &unsignedp, &volatilep);
+ poffset, &mode, &unsignedp, &volatilep,
+ false);
if (TREE_CODE (core) == INDIRECT_REF)
core = TREE_OPERAND (core, 0);