re PR middle-end/53460 (Internal compiler error: in calc_dfs_tree, at dominance.c...
authorRichard Guenther <rguenther@suse.de>
Thu, 24 May 2012 12:46:53 +0000 (12:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 24 May 2012 12:46:53 +0000 (12:46 +0000)
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.

From-SVN: r187831

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-prof/pr53460.C [new file with mode: 0644]
gcc/tree-profile.c

index 5188cdb351abc7dc6cdbcb993c8c9a6b04065854..4c6b9c0b24f3aa9890eedcb0fa2b0a1585ac6e89 100644 (file)
@@ -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  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (create_var_ann): Remove.
index 06fc8dbe31f948b610a8f70255abad8670a018f5..eeeb8e21f5508fd3b67166e330c12ea22c701961 100644 (file)
@@ -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  Richard Guenther  <rguenther@suse.de>
 
        PR bootstrap/53466
diff --git a/gcc/testsuite/g++.dg/tree-prof/pr53460.C b/gcc/testsuite/g++.dg/tree-prof/pr53460.C
new file mode 100644 (file)
index 0000000..ed05e0b
--- /dev/null
@@ -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() {}
index 94616262babe903f7f9bc3b6eec233a760cd0b47..4136821bca60b206d8ac13da571e527881fdb1f8 100644 (file)
@@ -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