]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] PR modula2/115112 Incorrect line debugging information occurs during INC...
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 13 Feb 2025 18:17:17 +0000 (18:17 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 13 Feb 2025 18:17:17 +0000 (18:17 +0000)
commit3d961691e0878e1328f9cbbc1d1af5e573ee6786
tree21472ab9c0db5fc8ad7b22b7e97dce3d0f484565
parent9fa962a5db797665972aaa65426b881754782cfb
[PATCH] PR modula2/115112 Incorrect line debugging information occurs during INC builtin

This patch fixes location bugs in BuildDecProcedure,
BuildIncProcedure, BuildInclProcedure, BuildExclProcedure and
BuildThrow.  All these procedure functions use the token position
passed as a parameter (rather than from the quad stack).  It also
fixes location bugs in CheckRangeIncDec to ensure that the token
position is stored on the quad stack before calling subsidiary
procedure functions.

gcc/m2/ChangeLog:

PR modula2/115112
* gm2-compiler/M2Quads.mod (BuildPseudoProcedureCall): Pass
tokno to each build procedure.
(BuildThrowProcedure): New parameter functok.
(BuildIncProcedure): New parameter proctok.
Pass proctok on the quad stack during every push.
(BuildDecProcedure): Ditto.
(BuildInclProcedure): New parameter proctok.
(BuildExclProcedure): New parameter proctok.

gcc/testsuite/ChangeLog:

PR modula2/115112
* gm2/pim/run/pass/dectest.mod: New test.
* gm2/pim/run/pass/inctest.mod: New test.

(cherry picked from commit 4d0faaaaf917528d1c59bfad5401274c5be71b7b)

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2Quads.mod
gcc/testsuite/gm2/pim/run/pass/dectest.mod [new file with mode: 0644]
gcc/testsuite/gm2/pim/run/pass/inctest.mod [new file with mode: 0644]