1f08c3bdfSopenharmony_cistatic void fn(void)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	static int i, *ptr = (void *)0;
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ci	i = __sync_fetch_and_add(ptr, 0);
6f08c3bdfSopenharmony_ci	i = __sync_fetch_and_sub(ptr, 0);
7f08c3bdfSopenharmony_ci	i = __sync_fetch_and_or(ptr, 0);
8f08c3bdfSopenharmony_ci	i = __sync_fetch_and_and(ptr, 0);
9f08c3bdfSopenharmony_ci	i = __sync_fetch_and_xor(ptr, 0);
10f08c3bdfSopenharmony_ci	i = __sync_fetch_and_nand(ptr, 0);
11f08c3bdfSopenharmony_ci	i = __sync_add_and_fetch(ptr, 0);
12f08c3bdfSopenharmony_ci	i = __sync_sub_and_fetch(ptr, 0);
13f08c3bdfSopenharmony_ci	i = __sync_or_and_fetch(ptr, 0);
14f08c3bdfSopenharmony_ci	i = __sync_and_and_fetch(ptr, 0);
15f08c3bdfSopenharmony_ci	i = __sync_xor_and_fetch(ptr, 0);
16f08c3bdfSopenharmony_ci	i = __sync_nand_and_fetch(ptr, 0);
17f08c3bdfSopenharmony_ci	i = __sync_bool_compare_and_swap(ptr, 0, 1);
18f08c3bdfSopenharmony_ci	i = __sync_val_compare_and_swap(ptr, 0, 1);
19f08c3bdfSopenharmony_ci	__sync_synchronize();
20f08c3bdfSopenharmony_ci	i = __sync_lock_test_and_set(ptr, 0);
21f08c3bdfSopenharmony_ci	__sync_lock_release(ptr);
22f08c3bdfSopenharmony_ci}
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci/*
25f08c3bdfSopenharmony_ci * check-name: __builtin_atomic
26f08c3bdfSopenharmony_ci * check-error-start
27f08c3bdfSopenharmony_ci * check-error-end
28f08c3bdfSopenharmony_ci */
29