1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O" } */
4 extern void usleep (int) __attribute__((transaction_pure
));
5 extern int rand(void) __attribute__((pure
, transaction_pure
));
6 extern int printf (const char *, ...);
7 extern void *malloc (__SIZE_TYPE__
) __attribute__((malloc
));
8 extern void xyzzy (void * (*)(void *));
17 void *hello(void *arg
)
22 printf ("Thread reads %d.\n", tmp
);
26 usleep ((int) (10.0*rand()/(10+1.0))/100);
30 printf("tmp3 = %d\n", tmp3
);