Patchwork [committed] fix g++.dg/tm/pr47530-2.C and pr47530.C

login
register
mail settings
Submitter Aldy Hernandez
Date Nov. 9, 2012, 6:45 p.m.
Message ID <509D4F48.8040607@redhat.com>
Download mbox | patch
Permalink /patch/198142/
State New
Headers show

Comments

Aldy Hernandez - Nov. 9, 2012, 6:45 p.m.
Now that we have two code paths, the testsuite needs to be adjusted.

Committed as obvious.
commit 1cfee58f7559592cc21e8c68754a1c0093c5876d
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Nov 9 12:42:00 2012 -0600

    +       * g++.dg/tm/pr47530-2.C: Adjust for uninstrumented code path.
    +       * g++.dg/tm/pr47530.C: Same.

Patch

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e888313..fa0919e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@ 
+2012-11-09  Aldy Hernandez  <aldyh@redhat.com>
+
+	* g++.dg/tm/pr47530-2.C: Adjust for uninstrumented code path.
+	* g++.dg/tm/pr47530.C: Same.
+
 2012-11-09  Jason Merrill  <jason@redhat.com>
 
 	PR c++/54859
diff --git a/gcc/testsuite/g++.dg/tm/pr47530-2.C b/gcc/testsuite/g++.dg/tm/pr47530-2.C
index c98e07e..bcfdbe9 100644
--- a/gcc/testsuite/g++.dg/tm/pr47530-2.C
+++ b/gcc/testsuite/g++.dg/tm/pr47530-2.C
@@ -31,5 +31,9 @@  void bench_test()
     }
 }
 
-// { dg-final { scan-tree-dump-times "ITM_commitTransaction.*tail call" 0 "tmedge" } }
+// There should be two calls to commitTransaction.
+// The one in the uninstrumented code path is a tail call.
+// The one in the instrumented code path is not.
+// { dg-final { scan-tree-dump-times "ITM_commitTransaction.*tail call" 1 "tmedge" } }
+
 // { dg-final { cleanup-tree-dump "tmedge" } }
diff --git a/gcc/testsuite/g++.dg/tm/pr47530.C b/gcc/testsuite/g++.dg/tm/pr47530.C
index 8e7e272..6a9fb1b 100644
--- a/gcc/testsuite/g++.dg/tm/pr47530.C
+++ b/gcc/testsuite/g++.dg/tm/pr47530.C
@@ -73,7 +73,8 @@  void LinkedList::insert(int val)
   }
 }
 
-// Make sure we don't do tail optimization on the commit.
-// { dg-final { scan-tree-dump-times "commitTransaction...; .tail call" 0 "optimized" } }
+// Make sure we don't do tail optimization on the commit, except on
+// the uninstrumented code path.
+// { dg-final { scan-tree-dump-times "commitTransaction...; .tail call" 1 "optimized" } }
 // { dg-final { cleanup-tree-dump "optimized" } }