aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C b/gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C
new file mode 100644
index 000000000..9d2971bbb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/tm/pr51212.C
@@ -0,0 +1,19 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm -fnon-call-exceptions" }
+
+struct S
+{
+ S ()
+ {
+ }
+};
+
+__attribute__ ((transaction_callable))
+void foo (int *p)
+{
+ S s;
+ if (*p)
+ ;
+}
+
+// { dg-message "sorry, unimplemented: transactional memory is not supported with non-call exceptions" "-fnon-call-exceptions and -fgnu-tm together" { target *-*-* } 0 }