producer/consumer works with GCC, Clang works only with O0