In flush_nolist.1c, isn't there a data race in function f1 on “*q=1” ?
This can be executed by all threads concurrently, and in all threads, q points to the shared variable j.
Also, a thread could be executing "sum += j" in function g while another thread is executing "*q=1" --- isn't that also a possible read-write data race?