re PR c/8639 (simple integer arithmetic expression broken)
PR c/8639 * fold-const.c (extract_muldiv): Don't propagate division unless both arguments are multiples of C. From-SVN: r59471
This commit is contained in:
parent
2d339de623
commit
42370c15bb
|
@ -1,3 +1,9 @@
|
|||
2002-11-25 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
|
||||
|
||||
PR c/8639
|
||||
* fold-const.c (extract_muldiv): Don't propagate division unless
|
||||
both arguments are multiples of C.
|
||||
|
||||
2002-11-24 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR optimization/8275
|
||||
|
|
|
@ -4617,10 +4617,10 @@ extract_muldiv (t, c, code, wide_type)
|
|||
t2 = extract_muldiv (op1, c, code, wide_type);
|
||||
if (t1 != 0 && t2 != 0
|
||||
&& (code == MULT_EXPR
|
||||
/* If not multiplication, we can only do this if either operand
|
||||
is divisible by c. */
|
||||
|| multiple_of_p (ctype, op0, c)
|
||||
|| multiple_of_p (ctype, op1, c)))
|
||||
/* If not multiplication, we can only do this if both operands
|
||||
are divisible by c. */
|
||||
|| (multiple_of_p (ctype, op0, c)
|
||||
&& multiple_of_p (ctype, op1, c))))
|
||||
return fold (build (tcode, ctype, convert (ctype, t1),
|
||||
convert (ctype, t2)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue