]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)
authorRichard Biener <rguenther@suse.de>
Tue, 23 Jul 2019 11:17:37 +0000 (11:17 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 23 Jul 2019 11:17:37 +0000 (11:17 +0000)
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: r273734

gcc/ChangeLog
gcc/lto-streamer-in.c

index 112ed4a1cdb0ff432630af9d1fba4c0f4589407a..b480c19dba478d122e93a3df6c6b5709384f5571 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2019-07-22  Paul A. Clarke  <pc@us.ibm.com>
 
        Backport from mainline
index 7727b9be760f34e6dcfb49a4c5c7bf0479585e2c..a9e874dc453576887361811a80236cfc295ea291 100644 (file)
@@ -1140,6 +1140,14 @@ input_function (tree fn_decl, struct 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))
                {