From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23343 invoked by alias); 27 Mar 2006 22:33:18 -0000 Received: (qmail 22883 invoked by uid 48); 27 Mar 2006 22:33:11 -0000 Date: Mon, 27 Mar 2006 22:33:00 -0000 Message-ID: <20060327223311.22882.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/26763] [4.1 Regression] wrong final value of induction variable calculated In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rakdver at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg02691.txt.bz2 List-Id: ------- Comment #3 from rakdver at gcc dot gnu dot org 2006-03-27 22:33 ------- (gdb) call debug_generic_stmt (ret) startD.1278_2 + -3B > startD.1278_2 + 396B; (gdb) call debug_generic_stmt (fold (ret)) 1 I guess the reasoning of fold is: it is pointer arithmetics, so it does not wrap. (-3B) = (0xfff...7) > 396B, so the result is always true. 4.0 does not have final value replacement, and 4.2 has different # of iterations analysis; but most likely some similar problem is latent in both versions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763