SVN commit r230979 always associates a loop's back-jump with the start
of the loop body. This caused a regression for gcov with conditional
loops, because then the loop body appears to be covered twice per
iteration.
2015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR gcov-profile/68603
* cp-gimplify.c (genericize_cp_loop): For the back-jump's location
use the start of the loop body only if the loop is unconditional.
From-SVN: r231146
+2015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ PR gcov-profile/68603
+ * cp-gimplify.c (genericize_cp_loop): For the back-jump's location
+ use the start of the loop body only if the loop is unconditional.
+
+2015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
+ to start of loop body instead of start of loop.
+
2015-12-01 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <James_Norris@mentor.com>
}
else
{
- location_t loc = EXPR_LOCATION (expr_first (body));
+ 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);