summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-02 17:09:28 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-02 17:09:28 +0000
commit02d148be70ca916515b746b29d214ab206dd5698 (patch)
tree4166fdbf7fe079332fa9944f9363c4f32a8b48c1 /gcc/testsuite/gcc.dg/tm
parent762fb8133dcdf2e207bb6675819fced6702e56e2 (diff)
downloadgcc-02d148be70ca916515b746b29d214ab206dd5698.tar.gz
PR/47492
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Handle BUILT_IN_TM_MEMSET. * trans-mem.c (find_tm_replacement_function): Same. * calls.c (special_function_p): Same. * tree-ssa-structalias.c: Same. * gtm-builtins.def: Add BUILT_IN_TM_MEMSET. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@169535 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm')
-rw-r--r--gcc/testsuite/gcc.dg/tm/memset.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/memset.c b/gcc/testsuite/gcc.dg/tm/memset.c
new file mode 100644
index 00000000000..33d3ce5503c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/memset.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm" } */
+
+extern void *memset (void *, int, __SIZE_TYPE__);
+
+char array[4] = "aaaa";
+
+__attribute__((transaction_safe))
+void *my_memset()
+{
+ return memset(array,'b',4);
+}
+
+
+int main()
+{
+
+ __transaction [[atomic]] {
+ my_memset();
+ }
+ return 0;
+}
+
+/* { dg-final { scan-assembler "_ITM_memsetW" } } */