diff mbox

-g vs. -g0 issue in LTO

Message ID alpine.LNX.2.00.1102241310270.17230@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Feb. 24, 2011, 12:45 p.m. UTC
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.
diff mbox

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