diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/memset.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/memset.c | 24 |
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..3b73ec6ee74 --- /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" } } */ |