gcc/testsuite/gcc.dg/tm/memset.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm" } */ |
| 3 | |
| 4 | extern void *memset (void *, int, __SIZE_TYPE__); |
| 5 | |
| 6 | char array[4] = "aaaa"; |
| 7 | |
| 8 | __attribute__((transaction_safe)) |
| 9 | void *my_memset() |
| 10 | { |
| 11 | return memset(array,'b',4); |
| 12 | } |
| 13 | |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | |
| 18 | __transaction_atomic { |
| 19 | my_memset(); |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | /* { dg-final { scan-assembler "_ITM_memsetW" } } */ |