* c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
[official-gcc.git] / libitm / testsuite / libitm.c / simple-1.c
blobde41740d49af44f2eaa8c33a96e365a557120b38
1 /* Verify that two sequential runs of a transaction will complete and
2 produce correct results. An early test of the library did in fact
3 leave things in an inconsistent state following the commit of the
4 first transaction. */
6 #include <stdlib.h>
8 static int x;
10 static void start (void)
12 __transaction_atomic { x++; }
15 int main()
17 start ();
18 start ();
20 if (x != 2)
21 abort ();
23 return 0;