From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24054 invoked by alias); 10 Dec 2012 13:23:51 -0000 Received: (qmail 23655 invoked by uid 48); 10 Dec 2012 13:23:22 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55079] [4.8 regression] false positive -Warray-bounds (also seen at -O3 bootstrap) Date: Mon, 10 Dec 2012 13:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Status AssignedTo 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 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 X-SW-Source: 2012-12/txt/msg00978.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55079 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | --- Comment #11 from Richard Biener 2012-12-10 13:23:17 UTC --- Created attachment 28911 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28911 prototype patch The pattern we have is : _36 = i_33 + 1; _37 = a[i_33]; a[_36] = _37; i_39 = i_33 + 4294967295; if (i_33 != 0) goto ; else goto ; : _42 = i_39 + 1; _43 = a[i_39]; a[_42] = _43; and eventually adding an assert in bb7 that i_39 != 1 would help. But the only thing we try to add extra asserts for is stuff in the definition chain of comparison operands ... this OTOH is for stuff that uses comparison operands and live on the edge. Prototype patch attached, fixes comment#8 at least.