From 0bd65f4fde4b6a3615fd166bdd0e65dbda99fa9c Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 23 Jul 2019 10:45:59 +0000 Subject: [PATCH] re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642) 2019-07-23 Richard Biener PR debug/91231 * lto-streamer-in.c (input_function): Drop inline-entry markers that ended up with an unknown location block. From-SVN: r273733 --- gcc/ChangeLog | 6 ++++++ gcc/lto-streamer-in.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1add332e0fe..41058783c0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-23 Richard Biener + + PR debug/91231 + * lto-streamer-in.c (input_function): Drop inline-entry markers + that ended up with an unknown location block. + 2019-07-23 Richard Biener PR tree-optimization/83518 diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 155805b3c43..3158edd4c5f 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)) { -- 2.30.2