aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-07-23 10:45:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-07-23 10:45:59 +0000
commit0bd65f4fde4b6a3615fd166bdd0e65dbda99fa9c (patch)
tree52b9a64cf195f3978b48a9cb18fd40b65bf2ddfc /gcc/lto-streamer-in.c
parent62e3e66f130fc280eac0bbb6b69e9adca328c03b (diff)
downloadgcc-0bd65f4fde4b6a3615fd166bdd0e65dbda99fa9c.zip
gcc-0bd65f4fde4b6a3615fd166bdd0e65dbda99fa9c.tar.gz
gcc-0bd65f4fde4b6a3615fd166bdd0e65dbda99fa9c.tar.bz2
re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)
2019-07-23 Richard Biener <rguenther@suse.de> PR debug/91231 * lto-streamer-in.c (input_function): Drop inline-entry markers that ended up with an unknown location block. From-SVN: r273733
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 155805b..3158edd 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1141,6 +1141,14 @@ input_function (tree fn_decl, class data_in *data_in,
? !MAY_HAVE_DEBUG_MARKER_STMTS
: !MAY_HAVE_DEBUG_BIND_STMTS))
remove = true;
+ /* In case the linemap overflows locations can be dropped
+ to zero. Thus do not keep nonsensical inline entry markers
+ we'd later ICE on. */
+ tree block;
+ if (gimple_debug_inline_entry_p (stmt)
+ && (block = gimple_block (stmt))
+ && !inlined_function_outer_scope_p (block))
+ remove = true;
if (is_gimple_call (stmt)
&& gimple_call_internal_p (stmt))
{