public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] re PR rtl-optimization/81025 (gcc ICE while building glibc for MIPS soft-float multi-lib variant)
Date: Fri, 14 May 2021 14:56:17 +0000 (GMT)	[thread overview]
Message-ID: <20210514145617.53CC63950E54@sourceware.org> (raw)

https://gcc.gnu.org/g:fd2e3c2029cf9cf74e2eac3791128cf664f47c33

commit fd2e3c2029cf9cf74e2eac3791128cf664f47c33
Author: Jeff Law <law@redhat.com>
Date:   Wed Apr 3 10:03:37 2019 -0600

    re PR rtl-optimization/81025 (gcc ICE while building glibc for MIPS soft-float multi-lib variant)
    
    2019-04-03  Jeff Law  <law@redhat.com>
    
            PR rtl-optimization/81025
            * reorg.c (skip_consecutive_labels): Do not skip past a BARRIER.
    
    (cherry picked from commit 9427422ddacdf1c2914adfb6e8edca87f250fdfc)

Diff:
---
 gcc/reorg.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gcc/reorg.c b/gcc/reorg.c
index f4d39b8dd6e..9ac3b891af7 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -137,7 +137,20 @@ skip_consecutive_labels (rtx label_or_return)
 
   rtx_insn *label = as_a <rtx_insn *> (label_or_return);
 
-  for (insn = label; insn != 0 && !INSN_P (insn); insn = NEXT_INSN (insn))
+  /* __builtin_unreachable can create a CODE_LABEL followed by a BARRIER.
+
+     Since reaching the CODE_LABEL is undefined behavior, we can return
+     any code label and we're OK at runtime.
+
+     However, if we return a CODE_LABEL which leads to a shrinked wrapped
+     epilogue, but the path does not have a prologue, then we will trip
+     a sanity check in the dwarf2 cfi code which wants to verify that
+     the CFIs are all the same on the traces leading to the epilogue.
+
+     So we explicitly disallow looking through BARRIERS here.  */
+  for (insn = label;
+       insn != 0 && !INSN_P (insn) && !BARRIER_P (insn);
+       insn = NEXT_INSN (insn))
     if (LABEL_P (insn))
       label = insn;


                 reply	other threads:[~2021-05-14 14:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210514145617.53CC63950E54@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).