public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/99034] [9 Regression] error: EH landing pad label <L3> is not first in a sequence of labels in bb 6during GIMPLE pass: einline since r9-6254-gf86624d85f937e03
Date: Tue, 20 Apr 2021 23:32:43 +0000	[thread overview]
Message-ID: <bug-99034-4-XgFtYCy5sX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99034-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:8a6114146001eafc1921b60e40bf5c0e4f4b8e64

commit r9-9423-g8a6114146001eafc1921b60e40bf5c0e4f4b8e64
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 19 12:14:39 2021 +0100

    tree-cfg: Fix up gimple_merge_blocks FORCED_LABEL handling [PR99034]

    The verifiers require that DECL_NONLOCAL or EH_LANDING_PAD_NR
    labels are always the first label if there is more than one label.

    When merging blocks, we don't honor that though.
    On the following testcase, we try to merge blocks:
    <bb 13> [count: 0]:
    <L2>:
    S::~S (&s);

    and
    <bb 15> [count: 0]:
    <L0>:
    resx 1

    where <L2> is landing pad and <L0> is FORCED_LABEL.  And the code puts
    the FORCED_LABEL before the landing pad label, violating the verification
    requirements.

    The following patch fixes it by moving the FORCED_LABEL after the
    DECL_NONLOCAL or EH_LANDING_PAD_NR label if it is the first label.

    2021-02-19  Jakub Jelinek  <jakub@redhat.com>

            PR ipa/99034
            * tree-cfg.c (gimple_merge_blocks): If bb a starts with eh landing
            pad or non-local label, put FORCED_LABELs from bb b after that
label
            rather than before it.

            * g++.dg/opt/pr99034.C: New test.

    (cherry picked from commit 33be24d77d3d8f0c992eb344ce63f78e14cf753d)

  parent reply	other threads:[~2021-04-20 23:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 17:41 [Bug c++/99034] New: [10/11 Regression] ICE in emit_to_new_bb_before, at except.c:932 gscfq@t-online.de
2021-02-09 18:03 ` [Bug ipa/99034] " mpolacek at gcc dot gnu.org
2021-02-10  7:22 ` rguenth at gcc dot gnu.org
2021-02-10 10:39 ` marxin at gcc dot gnu.org
2021-02-18 12:09 ` [Bug ipa/99034] [9/10/11 Regression] error: EH landing pad label <L3> is not first in a sequence of labels in bb 6during GIMPLE pass: einline since r9-6254-gf86624d85f937e03 marxin at gcc dot gnu.org
2021-02-18 12:20 ` jakub at gcc dot gnu.org
2021-02-18 18:19 ` jakub at gcc dot gnu.org
2021-02-19 11:15 ` cvs-commit at gcc dot gnu.org
2021-02-19 11:16 ` [Bug ipa/99034] [9/10 " jakub at gcc dot gnu.org
2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
2021-03-20  8:08 ` [Bug ipa/99034] [9 " jakub at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-22 16:51 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org

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=bug-99034-4-XgFtYCy5sX@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).