https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77744
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Pedantically this isn't valid, because you are mixing C++11 features (lambdas) with OpenMP, which doesn't support C++11 even in 4.5, so it is all unspecified behavior. Also, have you built libgomp with -fsanitize=thread after configuring it with --disable-linux-futex (otherwise libtsan doesn't understand the barriers etc. in libgomp)?