From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26999 invoked by alias); 17 Jan 2013 18:29:43 -0000 Received: (qmail 26444 invoked by uid 48); 17 Jan 2013 18:28:19 -0000 From: "matt at use dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/42371] dead code not eliminated during folding with whole-program Date: Thu, 17 Jan 2013 18:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: matt at use dot net X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mjambor at suse dot cz X-Bugzilla-Target-Milestone: --- 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: 2013-01/txt/msg01657.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42371 --- Comment #13 from Matt Hargett 2013-01-17 18:28:18 UTC --- No. 4.6 doesn't devirt (at -O2 or -O3) and therefore the DCE isn't relevant. At both -O2 and -O3, with and without -fwhole-program, both with and without adjustin declarations one()/two() to one(void)/two(void): 4.7 and google/4.7 both devirt correctly but the DCE on the function bodies doesn't happen. 4.8 also devirts correctly, but the DCE on the function bodies doesn't happen.