From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 971 invoked by alias); 30 Jun 2011 20:38:45 -0000 Received: (qmail 961 invoked by uid 22791); 30 Jun 2011 20:38:44 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_DX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 20:38:31 +0000 From: "xinliangli at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug regression/49498] [4.7 Regression]: gcc.dg/uninit-pred-8_b.c bogus warning line 20 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: regression X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xinliangli at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.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 Date: Thu, 30 Jun 2011 20:38:00 -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 X-SW-Source: 2011-06/txt/msg03024.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49498 --- Comment #4 from davidxl 2011-06-30 20:37:36 UTC --- I can to reproduce the problem on x86-64 linux. Can you help provide the following dump: -fdump-tree-uninit-blocks-details? Thanks, David (In reply to comment #3) > Frankly, I'm just not able to wrap my head around the tree-ssa-uninit > implementation. I understand the general concepts, but just can't seem to find > where in that code we handle certain things. Perhaps it simply doesn't handle > them. > > In this simpler sample code we have: > > /* { dg-do compile } */ > /* { dg-options "-Wuninitialized -O2" } */ > > int g; > void bar(); > void blah(int); > > int foo (int n, int l, int m, int r) > { > int v; > > if (n < 10 || m > 100) > v = r; > > if (m) g++; > > if ( n < 10 || m > 100) > blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */ > > return 0; > } > > Compiling with -O2 -Wuninitialized on cris-elf. > > Someone who knows the code in tree-ssa-uninit.c really needs to chime in... > Reading that code just makes my head hurt. > > From the standpoint of the resulting CFG, the path 2->8->4->5->6 can never be > traversed, nor can 2->3->9->4->6. 2->3->9->4->5 is properly guarded as far as > I can tell, though I'm not convinced tree-ssa-uninit.c is computing the guards > correctly.