mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
[3.12] gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (GH-108242) (#108275)
gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (GH-108242)
(cherry picked from commit a1cc74c4ee
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
149d70c254
commit
4ee9454792
3 changed files with 16 additions and 1 deletions
|
@ -450,7 +450,7 @@ normalize_jumps_in_block(cfg_builder *g, basicblock *b) {
|
|||
if (backwards_jump == NULL) {
|
||||
return ERROR;
|
||||
}
|
||||
basicblock_addop(backwards_jump, JUMP, target->b_label.id, NO_LOCATION);
|
||||
basicblock_addop(backwards_jump, JUMP, target->b_label.id, last->i_loc);
|
||||
backwards_jump->b_instr[0].i_target = target;
|
||||
last->i_opcode = reversed_opcode;
|
||||
last->i_target = b->b_next;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue