This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25512] [4.1/4.2 Regression] Overflow not handled in ptr arithmetic folding
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2005 12:31:54 -0000
- Subject: [Bug middle-end/25512] [4.1/4.2 Regression] Overflow not handled in ptr arithmetic folding
- References: <bug-25512-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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