summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-24 12:50:15 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-24 12:50:15 +0000
commite1a98f390bd09ca2e4917c573896eb34a54c9cf0 (patch)
treeeb9123e0eed029683dd7045d5fd7063f5ec5ade3
parent1678dcdf749fdcf7cc7225d26ed6f44e0b71330d (diff)
downloadgcc-e1a98f390bd09ca2e4917c573896eb34a54c9cf0.tar.gz
2012-05-24 Richard Guenther <rguenther@suse.de>
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/branches/gcc-4_7-branch@187832 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/pr53460.C25
-rw-r--r--gcc/tree-profile.c3
4 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4b596495dbb..c5f65015e18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53460
+ * tree-profile.c (tree_profiling): Cleanup the CFG if
+ execute_fixup_cfg requests it.
+
2012-05-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/53465
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4e9872d3ceb..482ecc8c86e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53460
+ * g++.dg/tree-prof/pr53460.C: New testcase.
+
2012-05-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/53465
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 00000000000..ed05e0b9924
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/pr53460.C
@@ -0,0 +1,25 @@
+// { dg-options "-O" }
+
+template<typename T> class OwnPtr {
+public:
+ ~OwnPtr();
+};
+template<class T> class GlyphMetricsMap {
+public:
+ GlyphMetricsMap() { }
+ OwnPtr<int> m_pages;
+};
+class SimpleFontData {
+public:
+ void boundsForGlyph() const;
+};
+inline __attribute__((__always_inline__))
+void SimpleFontData::boundsForGlyph() const
+{
+ new GlyphMetricsMap<int>;
+}
+void offsetToMiddleOfGlyph(const SimpleFontData* fontData)
+{
+ fontData->boundsForGlyph();
+}
+int main() {}
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index c56650c066e..b566279aee6 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -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