re PR middle-end/78507 (ICE: tree check: expected integer_type or enumeral_type or...
authorBin Cheng <bin.cheng@arm.com>
Fri, 25 Nov 2016 11:45:43 +0000 (11:45 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 25 Nov 2016 11:45:43 +0000 (11:45 +0000)
commitae22bc5d4ad22aa0a8f21323bb576e6485ffbd4d
tree8bff6f7c3ab488c3bd7613c5c2b6ab3e3c4e7d53
parent1af928db7cd28e28e044f45760f11e0667d3fcbc
re PR middle-end/78507 (ICE: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in int_fits_type_p, at tree.c:9153)

PR middle-end/78507
PR middle-end/78510
PR middle-end/78517
* match.pd ((cond (cmp (convert1? @1) @3) (convert2? @1) @2)): Use
cmp directly, rather than cmp_code.  Initialize code to ERROR_MARK
and set it to result code if transformation is valid.  Use code EQ
directly in last simplification case.

gcc/testsuite
PR middle-end/78507
PR middle-end/78510
PR middle-end/78517
* g++.dg/torture/pr78507.C: New test.
* gcc.dg/torture/pr78510.c: New test.
* gcc.dg/torture/pr78517.c: New test.

From-SVN: r242874
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr78507.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr78510.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr78517.c [new file with mode: 0644]