* cp-gimplify.c (genericize_cp_loop): Revert location change.
From-SVN: r238737
2016-07-25 Jason Merrill <jason@redhat.com>
+ PR c++/65970
+ * cp-gimplify.c (genericize_cp_loop): Revert location change.
+
PR c++/71837
* lambda.c (add_capture): Leave a pack expansion in a TREE_LIST.
(build_lambda_object): Call build_x_compound_expr_from_list.
loop = stmt_list;
}
else
- loop = build1_loc (start_locus, LOOP_EXPR, void_type_node, stmt_list);
+ {
+ location_t loc = start_locus;
+ if (!cond || integer_nonzerop (cond))
+ loc = EXPR_LOCATION (expr_first (body));
+ if (loc == UNKNOWN_LOCATION)
+ loc = start_locus;
+ loop = build1_loc (loc, LOOP_EXPR, void_type_node, stmt_list);
+ }
stmt_list = NULL;
append_to_statement_list (loop, &stmt_list);