aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-10-14 13:08:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-10-14 13:08:44 +0000
commit77ce724c6b608989a50dd9ae86264ee0eec1b46a (patch)
tree570385da04e1f5e5e17965750a8ed05f1ca388f5 /gcc/lto-streamer-in.c
parent8ad1dde72beb06b5f3f183aa4d150cb889345bc1 (diff)
downloadgcc-77ce724c6b608989a50dd9ae86264ee0eec1b46a.zip
gcc-77ce724c6b608989a50dd9ae86264ee0eec1b46a.tar.gz
gcc-77ce724c6b608989a50dd9ae86264ee0eec1b46a.tar.bz2
re PR lto/41521 ([LTO] ICE verify_cgraph_node only with "-g")
2009-10-14 Richard Guenther <rguenther@suse.de> PR lto/41521 * lto-streamer-in.c (input_bb): Replace debug stmts with nops instead of dropping them. * gfortran.dg/lto/pr41521_0.f90: New testcase. * gfortran.dg/lto/pr41521_1.f90: Likewise. From-SVN: r152767
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index d9c207d..a899f9d 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1014,15 +1014,15 @@ input_bb (struct lto_input_block *ib, enum LTO_tags tag,
{
gimple stmt = input_gimple_stmt (ib, data_in, fn, tag);
- /* Drop debug stmts on-the-fly if we do not have VTA enabled.
+ /* Change debug stmts to nops on-the-fly if we do not have VTA enabled.
This allows us to build for example static libs with debugging
enabled and do the final link without. */
- if (MAY_HAVE_DEBUG_STMTS
- || !is_gimple_debug (stmt))
- {
- find_referenced_vars_in (stmt);
- gsi_insert_after (&bsi, stmt, GSI_NEW_STMT);
- }
+ if (!MAY_HAVE_DEBUG_STMTS
+ && is_gimple_debug (stmt))
+ stmt = gimple_build_nop ();
+
+ find_referenced_vars_in (stmt);
+ gsi_insert_after (&bsi, stmt, GSI_NEW_STMT);
/* After the statement, expect a 0 delimiter or the EH region
that the previous statement belongs to. */
@@ -1033,8 +1033,7 @@ input_bb (struct lto_input_block *ib, enum LTO_tags tag,
{
HOST_WIDE_INT region = lto_input_sleb128 (ib);
gcc_assert (region == (int) region);
- if (MAY_HAVE_DEBUG_STMTS || !is_gimple_debug (stmt))
- add_stmt_to_eh_lp (stmt, region);
+ add_stmt_to_eh_lp (stmt, region);
}
tag = input_record_start (ib);