Fix gcc_assert in expand_omp_for_static_chunk 2015-04-15 Tom de Vries PR tree-optimization/65637 * omp-low.c (expand_omp_for_static_chunk): Fix gcc_assert for the case that head is NULL. --- gcc/omp-low.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 80bddf0..f7b9d11 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -7274,7 +7274,7 @@ expand_omp_for_static_chunk (struct omp_region *region, locus = redirect_edge_var_map_location (vm); add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus); } - gcc_assert (gsi_end_p (psi) && i == head->length ()); + gcc_assert (gsi_end_p (psi) && (head == NULL || i == head->length ())); redirect_edge_var_map_clear (re); while (1) { -- 1.9.1