From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13614 invoked by alias); 19 Aug 2008 02:34:58 -0000 Received: (qmail 13381 invoked by uid 48); 19 Aug 2008 02:33:38 -0000 Date: Tue, 19 Aug 2008 02:34:00 -0000 Message-ID: <20080819023338.13380.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" 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: 2008-08/txt/msg01351.txt.bz2 ------- Comment #12 from manu at gcc dot gnu dot org 2008-08-19 02:33 ------- The key difference is -ftree-vrp (which is enabled at -O2). With INIT=2, it is missing the obvious optimization that it detects with INIT=1. I wonder if this is expected (after all, it is value-RANGE-propagation) or there is a PR open about this. Notice that any two consecutive integers trigger the optimization 0,1 but also 1,2 and thus remove the bogus uninitialized warning. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|bogus uninitialized warning |bogus uninitialized warning |(loop representation) |(loop representation, VRP | |missed-optimization) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36296