From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19995 invoked by alias); 2 Nov 2012 16:35:48 -0000 Received: (qmail 14687 invoked by uid 55); 2 Nov 2012 16:35:05 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55079] [4.8 regression] false positive -Warray-bounds Date: Fri, 02 Nov 2012 16:35: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: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 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 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-11/txt/msg00167.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55079 --- Comment #4 from Jan Hubicka 2012-11-02 16:35:01 UTC --- Author: hubicka Date: Fri Nov 2 16:34:52 2012 New Revision: 193098 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193098 Log: PR middle-end/55079 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update MAX field if NITER was folded to contant. (record_estimate): Sanity check. * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): New function. (remove_redundant_iv_test): New function. (loops_to_unloop, loops_to_unloop_nunroll): New static vars. (unloop_loops): Break out from ... (try_unroll_loop_completely): ... here; Pass in MAXITER; use remove_exits_and_undefined_stmts; do not unloop. (canonicalize_loop_induction_variables): Compute MAXITER; use remove_redundant_iv_test; remove loop_close_ssa_invalidated and irred_invalidated arguments. (canonicalize_induction_variables): Compute fresh bound estimates; unloop; walk from innermost. (tree_unroll_loops_completely): Likewise. * gcc.dg/tree-ssa/cunroll-10.c: New testcase. * gcc.dg/tree-ssa/cunroll-9.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/cunroll-10.c trunk/gcc/testsuite/gcc.dg/tree-ssa/cunroll-9.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-loop-ivcanon.c trunk/gcc/tree-ssa-loop-niter.c