From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27247 invoked by alias); 12 Apr 2013 20:02:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27198 invoked by uid 48); 12 Apr 2013 20:02:01 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56932] [regression 4.8]: vrp and/or niter-related wrong-code bug Date: Fri, 12 Apr 2013 20:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01312.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56932 --- Comment #6 from Marc Glisse 2013-04-12 20:02:01 UTC --- (In reply to comment #4) > Well, indeed increasing the array-size helps to avoid this issue. Nevertheless > I don't get why it produces wrong code for argument of call of function t here. At iteration i, you write to a[i], so i is obviously <250. This means that at the next iteration, i<251, i+5<256, and the &0xff can be omitted. > That there is a out-of-bounds access is one thing, but there is still wrong > code produced. Well, no, the program could have crashed for the out of bounds access before even reaching the point where you noticed the "wrong code". > Also why - if gcc already detects an out-of-bounds access - > there is no warning for that? There is a lot of progress to be made here...