From 141de90eb66692b4e3567b45ab73d756b6538b29 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 24 May 2012 12:46:53 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187831 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/tree-prof/pr53460.C | 25 +++++++++++++++++++++++++ gcc/tree-profile.c | 3 ++- 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/tree-prof/pr53460.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5188cdb..4c6b9c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2012-05-24 Richard Guenther + PR middle-end/53460 + * tree-profile.c (tree_profiling): Cleanup the CFG if + execute_fixup_cfg requests it. + +2012-05-24 Richard Guenther + * tree-flow.h (create_var_ann): Remove. * tree-dfa.c (create_var_ann): Remove and inline into its single caller ... diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 06fc8db..eeeb8e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2012-05-24 Richard Guenther + PR middle-end/53460 + * g++.dg/tree-prof/pr53460.C: New testcase. + +2012-05-24 Richard Guenther + PR bootstrap/53466 * g++.dg/debug/pr53466.C: New testcase. diff --git a/gcc/testsuite/g++.dg/tree-prof/pr53460.C b/gcc/testsuite/g++.dg/tree-prof/pr53460.C new file mode 100644 index 0000000..ed05e0b --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-prof/pr53460.C @@ -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() {} diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 9461626..4136821 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -491,7 +491,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 -- 2.7.4