https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107193
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- 1212 /* Traverse the basic block, if two function calls within a basic block 1213 are mapped to the same line, assign a new discriminator because a call 1214 stmt could be a split point of a basic block. */ 1215 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) 1216 { 1217 gimple *stmt = gsi_stmt (gsi); 1218 expanded_location curr_locus_e; Shouldn't curr_locus_e be defined outside of the loop? orelse, the second iteration, it will be uninitialized and pased to same_line_p? 1219 if (curr_locus == UNKNOWN_LOCATION) 1220 { 1221 curr_locus = gimple_location (stmt); 1222 curr_locus_e = expand_location (curr_locus); 1223 } 1224 else if (!same_line_p (curr_locus, &curr_locus_e, gimple_location (stmt))) 1225 { 1226 curr_locus = gimple_location (stmt); 1227 curr_locus_e = expand_location (curr_locus); 1228 curr_discr = 0; 1229 } 1230 else if (curr_discr != 0) 1231 { 1232 location_t loc = gimple_location (stmt); 1233 location_t dloc = location_with_discriminator (loc, curr_discr); 1234 gimple_set_location (stmt, dloc); 1235 } 1236 /* Allocate a new discriminator for CALL stmt. */ 1237 if (gimple_code (stmt) == GIMPLE_CALL) 1238 curr_discr = next_discriminator_for_locus (curr_locus); 1239 }