https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79321
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-02-01 CC| |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- Well, it's not GCC 7 regression, problem is that we generate a GOMP_parallel. After it's done, the main thread is going to do fork/exec: #0 __libc_fork () at ../sysdeps/nptl/fork.c:49 #1 0x00000000004ef765 in Perl_my_fork () at util.c:2303 #2 0x00000000004915f6 in Perl_pp_fork () at pp_sys.c:4009 #3 0x00000000004acccd in Perl_runops_standard () at run.c:37 #4 0x0000000000445f28 in S_run_body (oldscope=1) at perl.c:2017 #5 perl_run (my_perl=<optimized out>) at perl.c:1934 #6 0x00000000004034a2 in main (argc=4, argv=0x7fffffffdb88, env=<optimized out>) at perlmain.c:98 (gdb) info threads Id Target Id Frame * 1 Thread 0x7ffff7fae780 (LWP 3579) "perlbench_base." __libc_fork () at ../sysdeps/nptl/fork.c:49 2 Thread 0x7ffff70e6700 (LWP 3583) "perlbench_base." do_spin (val=8, addr=0x77e044) at ../../../libgomp/config/linux/wait.h:56 3 Thread 0x7ffff68e5700 (LWP 3584) "perlbench_base." futex_wait (val=8, addr=0x77e044) at ../../../libgomp/config/linux/x86/futex.h:44 4 Thread 0x7ffff60e4700 (LWP 3585) "perlbench_base." futex_wait (val=8, addr=0x77e044) at ../../../libgomp/config/linux/x86/futex.h:44 and that's why the other threads will not reach the barrier.