Mercurial > hg > CbC > CbC_gcc
view libitm/testsuite/libitm.c/clone-1.c @ 143:76e1cf5455ef
add cbc_gc test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 19:24:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Verify that we can look up tm clone of transaction_callable and transaction_pure. */ #include <stdlib.h> #include <libitm.h> static int x; int __attribute__((transaction_pure)) pure(int i) { return i+2; } int __attribute__((transaction_callable)) callable(void) { return ++x; } int main() { if (_ITM_getTMCloneSafe (&pure) != &pure) abort (); if (_ITM_getTMCloneSafe (&callable) == NULL) abort (); return 0; }