2 /* { dg-options "--param allow-store-data-races=0" } */
3 /* { dg-final { simulate-thread } } */
7 #include "../../gcc.dg/simulate-thread/simulate-thread.h"
17 static int global = 0;
19 void simulate_thread_other_threads()
25 int simulate_thread_step_verify()
27 if (p->d != global % 256)
29 printf("FAIL: invalid intermediate result\n");
35 int simulate_thread_final_verify()
39 printf("FAIL: invalid final result\n");
45 /* Store into <c> should not clobber <d>. */
46 /* We should not use a 32-bit move to store into p->, but a smaller move. */
47 __attribute__((noinline))
48 void simulate_thread_main()
56 p = (struct bits *) calloc (1, sizeof (struct bits));
57 simulate_thread_main();
58 simulate_thread_done();