public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Reset force_source_line in final.c
@ 2021-01-15 21:53 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-01-15 21:53 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

Unlike the other global variables, it is not reset at the beginning of a 
function so can leak into the next one.

Tested on x86-64/Linux, applied on the mainline as obvious.


2021-01-15  Eric Botcazou  <ebotcazou@adacore.com>

	* final.c (final_start_function_1): Reset force_source_line.

-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 446 bytes --]

diff --git a/gcc/final.c b/gcc/final.c
index b037e07fca0..daae115fef5 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1712,6 +1712,7 @@ final_start_function_1 (rtx_insn **firstp, FILE *file, int *seen,
   last_columnnum = LOCATION_COLUMN (prologue_location);
   last_discriminator = discriminator = 0;
   last_bb_discriminator = bb_discriminator = 0;
+  force_source_line = false;
 
   high_block_linenum = high_function_linenum = last_linenum;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-15 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 21:53 [patch] Reset force_source_line in final.c Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).