tree clauses, tree *cclauses)
{
tree decl, cond, incr, save_break, save_cont, body, init, stmt, cl;
- tree declv, condv, incrv, initv, ret = NULL;
+ tree declv, condv, incrv, initv, ret = NULL_TREE;
+ tree pre_body = NULL_TREE, this_pre_body;
bool fail = false, open_brace_parsed = false;
int i, collapse = 1, nbraces = 0;
location_t for_loc;
{
if (i > 0)
vec_safe_push (for_block, c_begin_compound_stmt (true));
+ this_pre_body = push_stmt_list ();
c_parser_declaration_or_fndef (parser, true, true, true, true, true,
NULL, vNULL);
+ if (this_pre_body)
+ {
+ this_pre_body = pop_stmt_list (this_pre_body);
+ if (pre_body)
+ {
+ tree t = pre_body;
+ pre_body = push_stmt_list ();
+ add_stmt (t);
+ add_stmt (this_pre_body);
+ pre_body = pop_stmt_list (pre_body);
+ }
+ else
+ pre_body = this_pre_body;
+ }
decl = check_for_loop_decls (for_loc, flag_isoc99);
if (decl == NULL)
goto error_init;
if (!fail)
{
stmt = c_finish_omp_for (loc, code, declv, initv, condv,
- incrv, body, NULL);
+ incrv, body, pre_body);
if (stmt)
{
if (cclauses != NULL