aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-11-01 00:59:53 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-11-01 00:59:53 +0000
commit41ba7ed74c7c2f8c4ede7dd98f9e5550869df45c (patch)
tree487ce678894b4aacf864a61333bbb21317e63e95 /gcc/expr.c
parent3d63de248f683be76a1ea4a81646813ff7d4b085 (diff)
downloadgcc-41ba7ed74c7c2f8c4ede7dd98f9e5550869df45c.zip
gcc-41ba7ed74c7c2f8c4ede7dd98f9e5550869df45c.tar.gz
gcc-41ba7ed74c7c2f8c4ede7dd98f9e5550869df45c.tar.bz2
re PR middle-end/11968 (Array reference is incorrectly computed for POINTERS_EXTEND_UNSIGNED)
PR middle-end/11968 * expr.c (expand_expr <MULT_EXPR>): Remove inappropriate and confusing comment; distributivity isn't handled in expand_expr. * fold-const.c (extract_muldiv_1 <PLUS_EXPR>): Allow overflow in distributivity, if wrap-around semantics are specified with -fwrapv. From-SVN: r73166
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index cd37495..347edb3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7854,16 +7854,6 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode,
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode,
EXPAND_SUM);
- /* If we knew for certain that this is arithmetic for an array
- reference, and we knew the bounds of the array, then we could
- apply the distributive law across (PLUS X C) for constant C.
- Without such knowledge, we risk overflowing the computation
- when both X and C are large, but X+C isn't. */
- /* ??? Could perhaps special-case EXP being unsigned and C being
- positive. In that case we are certain that X+C is no smaller
- than X and so the transformed expression will overflow iff the
- original would have. */
-
if (GET_CODE (op0) != REG)
op0 = force_operand (op0, NULL_RTX);
if (GET_CODE (op0) != REG)