Skip to content
Snippets Groups Projects
Commit 4d0faaaa authored by Gaius Mulley's avatar Gaius Mulley
Browse files

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.

Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
parent f1760283
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment