From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11081 invoked by alias); 14 Dec 2010 17:46:06 -0000 Received: (qmail 11002 invoked by uid 22791); 14 Dec 2010 17:46:05 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Tue, 14 Dec 2010 17:46:00 +0000 From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/45791] Missed devirtualization 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: jamborm 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: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed 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: Tue, 14 Dec 2010 17:46: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: 2010-12/txt/msg01632.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45791 Martin Jambor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.14 17:45:52 Ever Confirmed|0 |1 --- Comment #8 from Martin Jambor 2010-12-14 17:45:52 UTC --- I've just confirmed that main of the testcase from the initial bug description is optimized to nothing even by just the early optimizers on trunk. My dynamic-type change detection patches postpone that a little bit, unfortunately (and inevitably) but the final result is the same. I believe we have testcases already for this. As far as the testcase from comment #5 is concerned, that is quite another matter because the object is dynamically allocated there. If the constructor is inlined, we may do this with improved folding of O_T_R according to its first parameter. If it is not, we would need to be able to track the object interprocedurally to verify nothing bad happens to it (like a call to a destructor followed by a call to placement new). And of course we would have to solve the "operator new is not malloc" problem.