* [Bug ipa/99034] [10/11 Regression] ICE in emit_to_new_bb_before, at except.c:932
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 ` mpolacek at gcc dot gnu.org
2021-02-10 7:22 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-09 18:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Component|c++ |ipa
CC| |hubicka at gcc dot gnu.org,
| |marxin at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Target Milestone|--- |10.3
Last reconfirmed| |2021-02-09
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r276469.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug ipa/99034] [10/11 Regression] ICE in emit_to_new_bb_before, at except.c:932
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
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-10 7:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug ipa/99034] [10/11 Regression] ICE in emit_to_new_bb_before, at except.c:932
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
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-10 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I'll take a look.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (2 preceding siblings ...)
2021-02-10 10:39 ` marxin at gcc dot gnu.org
@ 2021-02-18 12:09 ` marxin at gcc dot gnu.org
2021-02-18 12:20 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-18 12:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Summary|[10/11 Regression] ICE in |[9/10/11 Regression] error:
|emit_to_new_bb_before, at |EH landing pad label <L3>
|except.c:932 |is not first in a sequence
| |of labels in bb 6during
| |GIMPLE pass: einline since
| |r9-6254-gf86624d85f937e03
Status|ASSIGNED |NEW
Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
A slightly modified test-case started with r9-6254-gf86624d85f937e03.
$ cat x.c
void *b[5];
void foo (void);
static void
__attribute__((always_inline))
bar (int d)
{
while (d)
foo ();
}
void
baz (void)
{
bar (2);
__builtin_setjmp (b);
}
@Jakub: Can you please take a look?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (3 preceding siblings ...)
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
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-18 12:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
No need for -finstrument-functions:
void *b[5];
void foo (void);
struct S { ~S (); };
static inline void
__attribute__((always_inline))
bar (int d)
{
S s;
while (d)
foo ();
}
void
baz (void)
{
bar (2);
__builtin_setjmp (b);
}
ICEs just with -O2.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (4 preceding siblings ...)
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
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-18 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50218
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50218&action=edit
gcc11-pr99034.patch
Untested fix.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (5 preceding siblings ...)
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
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-19 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:37bde2f87267908a93c07856317a28827f8284f7
commit r11-7294-g37bde2f87267908a93c07856317a28827f8284f7
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug ipa/99034] [9/10 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
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
` (6 preceding siblings ...)
2021-02-19 11:15 ` cvs-commit at gcc dot gnu.org
@ 2021-02-19 11:16 ` jakub at gcc dot gnu.org
2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-19 11:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] error: |[9/10 Regression] error: EH
|EH landing pad label <L3> |landing pad label <L3> is
|is not first in a sequence |not first in a sequence of
|of labels in bb 6during |labels in bb 6during GIMPLE
|GIMPLE pass: einline since |pass: einline since
|r9-6254-gf86624d85f937e03 |r9-6254-gf86624d85f937e03
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug ipa/99034] [9/10 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
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
` (7 preceding siblings ...)
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
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-19 23:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:33be24d77d3d8f0c992eb344ce63f78e14cf753d
commit r10-9473-g33be24d77d3d8f0c992eb344ce63f78e14cf753d
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 37bde2f87267908a93c07856317a28827f8284f7)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (8 preceding siblings ...)
2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
@ 2021-03-20 8:08 ` jakub at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-20 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10 Regression] error: EH |[9 Regression] error: EH
|landing pad label <L3> is |landing pad label <L3> is
|not first in a sequence of |not first in a sequence of
|labels in bb 6during GIMPLE |labels in bb 6during GIMPLE
|pass: einline since |pass: einline since
|r9-6254-gf86624d85f937e03 |r9-6254-gf86624d85f937e03
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3 too.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (9 preceding siblings ...)
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
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.3 |10.4
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (10 preceding siblings ...)
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:51 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:32 UTC (permalink / raw)
To: gcc-bugs
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)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (11 preceding siblings ...)
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 16:51 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-22 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a1d1df435b9b9eb2e78f73ac2ab6558302cb1918
commit r8-10888-ga1d1df435b9b9eb2e78f73ac2ab6558302cb1918
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)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [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
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
` (12 preceding siblings ...)
2021-04-22 16:51 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 17:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99034
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread