aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2025-03-16 15:56:48 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2025-03-16 15:56:48 +0000
commit5ed0564f2879db35106272556ba91f028177c5cd (patch)
tree97e135ec3974f65403bd08a96245e2db39e09392 /gcc/rust/util
parent952e17223d3a9809a32be23f86f77166b5860b36 (diff)
downloadgcc-5ed0564f2879db35106272556ba91f028177c5cd.zip
gcc-5ed0564f2879db35106272556ba91f028177c5cd.tar.gz
gcc-5ed0564f2879db35106272556ba91f028177c5cd.tar.bz2
PR modula2/115111 Incorrect line debugging locations at the end of the WHILE loop
This fix corrects the END token position used during the GotoOp at the bottom of the WHILE loop. The fix is to pass the relative token position down to M2Quads. This method should be replicated for the other loops END or UNTIL keywords and possibly the END statements for conditional statements. gcc/m2/ChangeLog: PR modula2/115111 * gm2-compiler/M2GenGCC.mod (CodeStatementNote): Add debugging. * gm2-compiler/M2Quads.def (BuildEndWhile): New parameter reltokpos. * gm2-compiler/M2Quads.mod (BuildEndWhile): Reimplement using new parameter. * gm2-compiler/P3Build.bnf (WhileStatement): Call BuildEndWhile with -1 relative position. * gm2-gcc/m2block.cc (do_add_stmt): Tidy comment. (GetGlobals): Ditto. (flush_pending_note): Remove #if 0 code. * gm2-gcc/m2pp.cc (m2pp_nop_expr): New function. (m2pp_statement): New case clause call m2pp_nop_expr. gcc/testsuite/ChangeLog: PR modula2/115111 * gm2/pim/pass/whilestep.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/rust/util')
0 files changed, 0 insertions, 0 deletions