[Bug middle-end/25512] [4.1/4.2 Regression] Overflow not handled in ptr arithmetic folding

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 21 12:31:00 GMT 2005



------- Comment #2 from rguenth at gcc dot gnu dot org  2005-12-21 12:31 -------
Created an attachment (id=10543)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10543&action=view)
patch

The attached patch would fix this and treat unsigned pointer arithmetic
overflow
as defined in this transformation.  Fallout:

FAIL: gcc.dg/tree-ssa/foldaddr-1.c scan-tree-dump-times return 0 1
FAIL: gcc.dg/tree-ssa/pr15791-1.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/pr15791-5.c scan-tree-dump-times i == j 1

language lawyer advice needed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25512



More information about the Gcc-bugs mailing list