summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 10:41:32 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 10:41:32 +0000
commita02d610fa28a5ebab2ccb8a755ec825004d0fe64 (patch)
treeab89cf6128ab5ba3cad20affa4abb053254a4376 /gcc/testsuite/gcc.dg/tm
parent6f61d402a88faae4357500d9a63d26317a546a13 (diff)
downloadgcc-a02d610fa28a5ebab2ccb8a755ec825004d0fe64.tar.gz
* trans-mem.c (diagnose_tm_1): Include function name when
displaying error. (ipa_tm_diagnose_tm_safe): Same. (ipa_tm_diagnose_transaction): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@158638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm')
-rw-r--r--gcc/testsuite/gcc.dg/tm/unsafe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/unsafe.c b/gcc/testsuite/gcc.dg/tm/unsafe.c
new file mode 100644
index 00000000000..b27e73b4dba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/unsafe.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm" } */
+
+__attribute__((transaction_callable))
+static int func ()
+{
+ return 12345;
+}
+
+int main()
+{
+ __transaction { return func(); } /* { dg-error "unsafe function call .func. " } */
+}