Reset prologue_location before calling code_end [PR 100467]

Message ID AM8PR10MB47081C7AC11EB03557ED1AB2E4549@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM
State New
Headers show
Series
  • Reset prologue_location before calling code_end [PR 100467]
Related show

Commit Message

Bernd Edlinger May 10, 2021, 5:02 a.m.
Hi,

this fixes a fallout from my previous patch to improve
debug info of virtual thunks.

Tested on x86_64-pc-linux-gnu with --target_board=unix/-m32
Is it OK for trunk?


Thanks
Bernd.

Comments

Richard Biener May 10, 2021, 6:15 a.m. | #1
On Mon, 10 May 2021, Bernd Edlinger wrote:

> Hi,

> 

> this fixes a fallout from my previous patch to improve

> debug info of virtual thunks.

> 

> Tested on x86_64-pc-linux-gnu with --target_board=unix/-m32

> Is it OK for trunk?


OK.

Richard.

> 

> Thanks

> Bernd.

> 


-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Patch

From 7bea6a83f4daf97ac1cfeb6c2e10fb7ae742340f Mon Sep 17 00:00:00 2001
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Sat, 8 May 2021 07:46:17 +0200
Subject: [PATCH] Reset prologue_location before calling code_end

Some targets emit thunks from the targetm.asm_out.code_end
function and set the DECL_IGNORED_P, but due to
e69ac020372 ("Add line debug info for virtual thunks")
the value in prologue_location is no longer ignored.

So reset that value before calling the backend.

2021-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR middle-end/100467
	* toplev.c (compile_file): Call insn_locations_init before
	targetm.asm_out.code_end.
---
 gcc/toplev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/toplev.c b/gcc/toplev.c
index d8cc254..7e23253 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -523,6 +523,7 @@  compile_file (void)
 
       /* This must be at the end before unwind and debug info.
 	 Some target ports emit PIC setup thunks here.  */
+      insn_locations_init ();
       targetm.asm_out.code_end ();
 
       /* Do dbx symbols.  */
-- 
1.9.1