Hi, This patch series fixes PR65637. Currently, ssa-handling code in expand_omp_for_static_chunk is dead and not exercised by testing. Ssa-handling code in omp-low.c is only triggered by pass_parallelize_loops, and that pass doesn't specify a chunk size on the GIMPLE_OMP_FOR it constructs, so that only exercises the expand_omp_for_static_nochunk path. Using the attached trigger patch, we excercise the ssa-handling code in expand_omp_for_static_chunk. The following patch series fixes the problems in the ssa-handling code that we encounter. 1. Fix gcc_assert in expand_omp_for_static_chunk 2. Fix inner loop phi in expand_omp_for_static_chunk 3. Handle 2 preds for fin_bb in expand_omp_for_static_chunk The patch series has been bootstrapped and reg-tested on x86_64 together with attached trigger patch. I'll post the patches from the patch series individually, in response to this email. Thanks, - Tom