Patchwork -g vs. -g0 issue in LTO

login
register
mail settings
Submitter Richard Guenther
Date Feb. 24, 2011, 12:45 p.m.
Message ID <alpine.LNX.2.00.1102241310270.17230@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/84391/
State New
Headers show

Comments

Richard Guenther - Feb. 24, 2011, 12:45 p.m.
I stumbled over this when looking into some ICEs with -g - we should
not find referenced vars in debug stmts.  Not that we should start
looking for -g vs. -g0 issues with LTO ...

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2011-02-24  Richard Guenther  <rguenther@suse.de>

	* lto-streamer-in.c (input_bb): Do not find referenced vars
	in debug statements.

Patch

Index: gcc/lto-streamer-in.c
===================================================================
--- gcc/lto-streamer-in.c	(revision 170462)
+++ gcc/lto-streamer-in.c	(working copy)
@@ -1097,8 +1097,8 @@  input_bb (struct lto_input_block *ib, en
   while (tag)
     {
       gimple stmt = input_gimple_stmt (ib, data_in, fn, tag);
-
-      find_referenced_vars_in (stmt);
+      if (!is_gimple_debug (stmt))
+	find_referenced_vars_in (stmt);
       gsi_insert_after (&bsi, stmt, GSI_NEW_STMT);
 
       /* After the statement, expect a 0 delimiter or the EH region