From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31022 invoked by alias); 25 Sep 2010 22:10:20 -0000 Received: (qmail 31011 invoked by uid 22791); 25 Sep 2010 22:10:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID 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; Sat, 25 Sep 2010 22:10:16 +0000 From: "hubicka 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: hubicka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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: Sun, 26 Sep 2010 03:33: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-09/txt/msg02805.txt.bz2 Message-ID: <20100926033300.PeqcCGtB-xh6-6Iu3vsFWO8chJLT0ndjF1DOArloAoA@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45791 --- Comment #3 from Jan Hubicka 2010-09-25 22:10:15 UTC --- Hmm, normally we should see it from COMPONENT_REF: while (true) { if (TREE_CODE (ref) == COMPONENT_REF) { tree par_type; tree binfo, base_binfo; tree field = TREE_OPERAND (ref, 1); if (!DECL_ARTIFICIAL (field)) { tree type = TREE_TYPE (field); if (TREE_CODE (type) == RECORD_TYPE) return TYPE_BINFO (type); else return NULL_TREE; } but we don't since it has DECL_ARTIFICIAL set. What is the logic here? Also what about i.e. ARRAY_REF and arrays of objects and COMPONENT_REFs translated to MEM_REFs? Honza