Thanks for the test case. I can confirm that I can reproduce this. (Detail: compiled with "gcc -fopenmp 668799.c -o 668799 -static" on an Ubuntu maverick ARM system. qemu-arm-user on x86-64 then segfaults when run with "OMP_NUM_THREADS=6 ./arm-linux-user/qemu-arm /tmp/668799".) The point when it segfaults varies, and occasionally it deadlocks instead for variety...
Looks like a fun bug; I'll have a deeper look at this later this week.
Thanks for the test case. I can confirm that I can reproduce this. (Detail: compiled with "gcc -fopenmp 668799.c -o 668799 -static" on an Ubuntu maverick ARM system. qemu-arm-user on x86-64 then segfaults when run with "OMP_NUM_THREADS=6 ./arm-linux- user/qemu- arm /tmp/668799".) The point when it segfaults varies, and occasionally it deadlocks instead for variety...
Looks like a fun bug; I'll have a deeper look at this later this week.