re PR middle-end/84834 (ICE: tree check: expected integer_cst, have complex_cst in...
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Mar 2018 08:12:59 +0000 (09:12 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Mar 2018 08:12:59 +0000 (09:12 +0100)
commit9e61e48e12ae2737f4738c37bfe05de726dc0e2e
treec36e6e8944f9cee6d2772d4dc9cc1540c2728783
parentcd471b26ca3923f6ca39105c0efe166248ec0425
re PR middle-end/84834 (ICE: tree check: expected integer_cst, have complex_cst in to_wide, at tree.h:5527)

PR middle-end/84834
* match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
integer_pow2p@2 and test integer_pow2p in condition.
(A < 0 ? C : 0): Similarly for @1.

* gcc.dg/pr84834.c: New test.

From-SVN: r258479
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr84834.c [new file with mode: 0644]