re PR c/61240 (Incorrect warning "integer overflow in expression" on pointer-pointer...
authorJakub Jelinek <jakub@redhat.com>
Thu, 18 Jan 2018 08:29:14 +0000 (09:29 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 18 Jan 2018 08:29:14 +0000 (09:29 +0100)
commit8ae438811f695dd025fb1fef254bff920777b494
tree3ebe287328aa2352463c380f91f601c2002085b1
parentfcf7923742d34c0cb7270594d4cdab4ea1199672
re PR c/61240 (Incorrect warning "integer overflow in expression" on pointer-pointer subtraction)

PR c/61240
* match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
pointer_diff optimizations use view_convert instead of convert.

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

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