fix gcc bug #34130 (wrong multiplication with negative constants
inside abs()) which got some attention in the linux kernel mailing list recently
This commit is contained in:
parent
f0927a591f
commit
ad37bd5da3
|
@ -5340,6 +5340,9 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
|
|||
}
|
||||
break;
|
||||
}
|
||||
/* If the constant is negative, we cannot simplify this. */
|
||||
if (tree_int_cst_sgn (c) == -1)
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
case NEGATE_EXPR:
|
||||
if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
|
||||
|
|
Loading…
Reference in New Issue