fold-const.c (extract_muldiv): If not MULT_EXPR, check if either operand is divisible...
authorJakub Jelinek <jakub@redhat.com>
Fri, 23 Feb 2001 12:28:07 +0000 (13:28 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Feb 2001 12:28:07 +0000 (13:28 +0100)
commitfba2c0cdbcf92d860a2acd8a2667a68b723dc8c0
treee1f9f314834b3eca87bb067c1aa26c0f4f9580ef
parent487f145008ff00d3d03b0aa1f6d6bcea4a84a404
fold-const.c (extract_muldiv): If not MULT_EXPR, check if either operand is divisible by C.

* fold-const.c (extract_muldiv) [case PLUS_EXPR]: If not MULT_EXPR,
check if either operand is divisible by C.
(multiple_of_p): Handle LSHIFT_EXPR with small constant shift.
If type is signed, consider negative numbers as well.

* gcc.c-torture/execute/20010222-1.c: New test.

From-SVN: r39996
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20010222-1.c [new file with mode: 0644]