https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115112
Bug ID: 115112 Summary: Incorrect line debugging information occurs during INC builtin. Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: gaius at gcc dot gnu.org Target Milestone: --- Similar to PR115111 the line number location appears wrong at the start of an INC builtin (it steps to the procedure declaration). It is likely that this problem also occurs with DEC. Again seen with the test code: MODULE testrestline ; IMPORT SeqFile, TextIO ; VAR chan : SeqFile.ChanId ; line : ARRAY [0..5] OF CHAR ; results : SeqFile.OpenResults ; BEGIN SeqFile.OpenWrite (chan, "test.input", SeqFile.write, results) ; TextIO.WriteString (chan, "a line of text exceeding 6 chars") ; TextIO.WriteLn (chan) ; TextIO.WriteString (chan, "a second lineline of text exceeding 6 chars") ; TextIO.WriteLn (chan) ; SeqFile.Close (chan) ; (* Now see if we can read the first line. *) SeqFile.OpenRead (chan, "test.input", SeqFile.read, results) ; TextIO.ReadRestLine (chan, line) END testrestline. and the WHILE loop with an INC in procedure ReadRestLine.