From patchwork Thu May 24 11:58:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 161132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3F5C8B6FD3 for ; Thu, 24 May 2012 21:58:51 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1338465532; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Subject:Message-ID:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=mQ+j+pNP5MVcsnzSsCzB NE2aGxo=; b=Wy16XgTIwCXnyTKDPJLQlUU7VWoEFCF4man05eZ/R1wRTejE10En VfE4PPABPz5V+DpwOdR2KkNH/UG7paaAADIVJW59PvZ5a3KRrpCFjDaGLYYh9hga z1c1Vfu2OnPu16rwhRcKWi8IiaEmPCQKmkO0ObtcAiUisUn15ZO+Hjo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PgOYieyCLiJjPirzPwJHBHhP0VcFnaIJJQuFuHYVGLN90r6p3tVyLjBMp6Fi3R sX9G21rQG6n0ePm2c8ybCqFEGXP58oKIo7P5babjlsOfloDJiO9bZ0nPOF8+bo9z krYfLroUVzs98D3L44RWfr96jAtkK4oupp3EoN/0NRwZo=; Received: (qmail 14031 invoked by alias); 24 May 2012 11:58:46 -0000 Received: (qmail 14022 invoked by uid 22791); 24 May 2012 11:58:45 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, TW_CF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 May 2012 11:58:30 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 70675914CD for ; Thu, 24 May 2012 13:58:29 +0200 (CEST) Date: Thu, 24 May 2012 13:58:29 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR53406 Message-ID: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes PR53406, calling execute_fixup_cfg may need a subsequent cfg-cleanup run. Profiledbootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2012-05-24 Richard Guenther PR middle-end/53460 * tree-profile.c (tree_profiling): Cleanup the CFG if execute_fixup_cfg requests it. * g++.dg/tree-prof/pr53460.C: New testcase. Index: gcc/tree-profile.c =================================================================== --- gcc/tree-profile.c (revision 187769) +++ gcc/tree-profile.c (working copy) @@ -497,7 +497,8 @@ tree_profiling (void) gcov_type_tmp_var = NULL_TREE; /* Local pure-const may imply need to fixup the cfg. */ - execute_fixup_cfg (); + if (execute_fixup_cfg () & TODO_cleanup_cfg) + cleanup_tree_cfg (); branch_prob (); if (! flag_branch_probabilities Index: gcc/testsuite/g++.dg/tree-prof/pr53460.C =================================================================== --- gcc/testsuite/g++.dg/tree-prof/pr53460.C (revision 0) +++ gcc/testsuite/g++.dg/tree-prof/pr53460.C (revision 0) @@ -0,0 +1,25 @@ +// { dg-options "-O" } + +template class OwnPtr { +public: + ~OwnPtr(); +}; +template class GlyphMetricsMap { +public: + GlyphMetricsMap() { } + OwnPtr m_pages; +}; +class SimpleFontData { +public: + void boundsForGlyph() const; +}; +inline __attribute__((__always_inline__)) +void SimpleFontData::boundsForGlyph() const +{ + new GlyphMetricsMap; +} +void offsetToMiddleOfGlyph(const SimpleFontData* fontData) +{ + fontData->boundsForGlyph(); +} +int main() {}