builtin_26_sync_synchronize.c (416B)
1 /* __sync_synchronize() is the legacy GCC full (sequentially-consistent) memory 2 * barrier: no operands, no result. SQLite uses it for sqlite3MemoryBarrier(). 3 * Single-threaded it has no observable effect, so we just confirm it parses, 4 * lowers to a fence, and the surrounding arithmetic still runs. */ 5 int test_main(void) { 6 int x = 21; 7 __sync_synchronize(); 8 x = x * 2; 9 __sync_synchronize(); 10 return x; 11 }