2 /* { dg-xfail-if "" { *-*-* } { "*" } { "" } } */
3 /* Tests static constructors inside of transactional code. */
8 int f(int x) __attribute__((noinline,transaction_safe));
15 static void *thread (void *)
18 __transaction_atomic { bar = f(10); }
28 // First, initialize y in another thread.
30 pthread_create(&pt, NULL, thread, NULL);
31 pthread_join(pt, NULL);
33 // Now y should already be initialized.
34 __transaction_atomic { bar = f(20); }