https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102854

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
For the non-template case (with int / IndexType reversed, (ups!)):

finish_omp_for's vec<tree> *orig_inits is an empty vector

but for the template, it isn't (it contains '0' and 'i'); thus, the following
check is run and fails:

      FOR_EACH_VEC_ELT (*orig_inits, i, orig_init)
        if (orig_init
            && !c_omp_check_loop_iv_exprs (locus,

The reason is that  type_dependent_expression_p (decl) == true in
cp_parser_omp_for_loop_init.

Reply via email to