Hi! If omp for loop body doesn't fallthru (which doesn't make much sense), then we would call GOMP_loop_static_start with wrong number of arguments if collapse is 1, static scheduling without chunk size and no ordered clause.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2012-02-13 Jakub Jelinek <ja...@redhat.com> PR middle-end/52230 * omp-low.c (expand_omp_for): If a static schedule without chunk size has NULL region->cont, force fd.chunk_size to be integer_zero_node. --- gcc/omp-low.c.jj 2012-01-13 21:47:35.000000000 +0100 +++ gcc/omp-low.c 2012-02-13 12:54:55.137590443 +0100 @@ -4664,6 +4664,9 @@ expand_omp_for (struct omp_region *regio { int fn_index, start_ix, next_ix; + if (fd.chunk_size == NULL + && fd.sched_kind == OMP_CLAUSE_SCHEDULE_STATIC) + fd.chunk_size = integer_zero_node; gcc_assert (fd.sched_kind != OMP_CLAUSE_SCHEDULE_AUTO); fn_index = (fd.sched_kind == OMP_CLAUSE_SCHEDULE_RUNTIME) ? 3 : fd.sched_kind; Jakub