summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/tm
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 05:16:36 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 05:16:36 +0000
commitbc4381667a31bd5f1e677d64c789b1e959df00d5 (patch)
treea6b80dca8f72a2e7640e4d535901e42325b2a954 /gcc/testsuite/c-c++-common/tm
parent1cd66bce1663eb648638d311b493de0dcc4146c3 (diff)
parent738c50b853f5ba0eaf93e23f6d29cbac761eef9e (diff)
downloadgcc-reload-v2a.tar.gz
Weekly merge from trunk. No regressions.reload-v2a
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/reload-v2a@181834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common/tm')
-rw-r--r--gcc/testsuite/c-c++-common/tm/malloc.c4
-rw-r--r--gcc/testsuite/c-c++-common/tm/trxn-expr-3.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/tm/malloc.c b/gcc/testsuite/c-c++-common/tm/malloc.c
index de7a766e36c..81bcc56fc41 100644
--- a/gcc/testsuite/c-c++-common/tm/malloc.c
+++ b/gcc/testsuite/c-c++-common/tm/malloc.c
@@ -17,7 +17,9 @@ void foobar(void)
z = (char *)malloc (666);
}
-/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" { target { ! { *-*-solaris2* && c++ } } } } } */
+/* Solaris 2 headers are C++-aware and declare std::malloc. */
+/* { dg-final { scan-tree-dump-times " std::malloc .666" 1 "tmmark" { target { *-*-solaris2* && c++ } } } } */
/* { dg-final { scan-tree-dump-times "__builtin__ITM_malloc" 1 "tmmark" } } */
/* { dg-final { scan-tree-dump-times "__builtin__ITM_calloc" 1 "tmmark" } } */
/* { dg-final { scan-tree-dump-times "__builtin__ITM_free" 2 "tmmark" } } */
diff --git a/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c b/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
new file mode 100644
index 00000000000..0a87780f17e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
@@ -0,0 +1,14 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark" }
+
+int global;
+
+int f2()
+{
+ return __transaction_atomic (global + 3)
+ + __transaction_atomic (global + 4);
+}
+
+/* { dg-final { scan-tree-dump-times "ITM_RU" 2 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "ITM_commitTransaction" 2 "tmmark" } } */
+/* { dg-final { cleanup-tree-dump "tmmark" } } */