From patchwork Thu Feb 24 12:45:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: -g vs. -g0 issue in LTO Date: Thu, 24 Feb 2011 02:45:19 -0000 From: Richard Guenther X-Patchwork-Id: 84391 Message-Id: To: gcc-patches@gcc.gnu.org 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 * lto-streamer-in.c (input_bb): Do not find referenced vars in debug statements. 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