public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
@ 2022-10-24 6:00 asolokha at gmx dot com
2022-10-24 8:04 ` [Bug tree-optimization/107369] " marxin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2022-10-24 6:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
Bug ID: 107369
Summary: [13 Regression] ICE: verify_flow_info failed (error:
label 'l1' has incorrect context in bb 2)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc 13.0.0 20221023 snapshot (g:0e37fd4dc74c1db99cdc7d71ef378e1221253c6f) ICEs
when compiling the following testcase, reduced from
gcc/testsuite/gcc.dg/attr-assume-3.c, w/ -O1:
void
foo (int x)
{
if (x == 1)
goto l1;
[[gnu::assume (({ l1:; 1; }))]];
}
% aarch64-linux-gnu-gcc-13 -O1 -c bgoph4pp.c
bgoph4pp.c: In function 'foo':
bgoph4pp.c:5:5: error: jump into statement expression
5 | goto l1;
| ^~~~
bgoph4pp.c:7:21: note: label 'l1' defined here
7 | [[gnu::assume (({ l1:; 1; }))]];
| ^~
bgoph4pp.c:2:1: error: label 'l1' has incorrect context in bb 2
2 | foo (int x)
| ^~~
during GIMPLE pass: cfg
bgoph4pp.c:2:1: internal compiler error: verify_flow_info failed
0xa39a8e verify_flow_info()
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/cfghooks.cc:284
0xf87e34 checking_verify_flow_info
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/cfghooks.h:214
0xf87e34 cleanup_tree_cfg_noloop
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/tree-cfgcleanup.cc:1161
0xf87e34 cleanup_tree_cfg(unsigned int)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/tree-cfgcleanup.cc:1212
0xf7d534 execute_build_cfg
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/tree-cfg.cc:378
0xf7d534 execute
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/tree-cfg.cc:412
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/107369] [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
@ 2022-10-24 8:04 ` marxin at gcc dot gnu.org
2022-10-24 8:50 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-24 8:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-10-24
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/107369] [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
2022-10-24 8:04 ` [Bug tree-optimization/107369] " marxin at gcc dot gnu.org
@ 2022-10-24 8:50 ` jakub at gcc dot gnu.org
2022-10-24 13:17 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-10-24 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
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 #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 53766
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53766&action=edit
gcc13-pr107369.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/107369] [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
2022-10-24 8:04 ` [Bug tree-optimization/107369] " marxin at gcc dot gnu.org
2022-10-24 8:50 ` jakub at gcc dot gnu.org
@ 2022-10-24 13:17 ` rguenth at gcc dot gnu.org
2022-10-25 8:42 ` cvs-commit at gcc dot gnu.org
2022-10-25 8:51 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-24 13:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Keywords| |error-recovery
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/107369] [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
` (2 preceding siblings ...)
2022-10-24 13:17 ` rguenth at gcc dot gnu.org
@ 2022-10-25 8:42 ` cvs-commit at gcc dot gnu.org
2022-10-25 8:51 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-25 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
--- Comment #2 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:7d888535f7ab80e9b08a633bfd774a923b311cde
commit r13-3478-g7d888535f7ab80e9b08a633bfd774a923b311cde
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Oct 25 10:39:20 2022 +0200
gimplify: Don't add GIMPLE_ASSUME if errors were seen [PR107369]
The FEs emit errors about jumps into assume attribute conditions,
but when we add GIMPLE_ASSUME for the condition which is reachable
through those jumps, we can run into cfg verification diagnostics.
Fixed by throwing the IFN_ASSUME away during gimplification if
seen_error () - like we already do for -O0. GIMPLE_ASSUME in the
middle-end
is a pure optimization thing and if errors were reported, the optimizations
will not be beneficial for anything.
2022-10-25 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/107369
* gimplify.cc (gimplify_call_expr): If seen_error, handle complex
IFN_ASSUME the same as for -O0.
* gcc.dg/attr-assume-4.c: New test.
* g++.dg/cpp23/attr-assume8.C: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/107369] [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2)
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
` (3 preceding siblings ...)
2022-10-25 8:42 ` cvs-commit at gcc dot gnu.org
@ 2022-10-25 8:51 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-10-25 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107369
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-25 8:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 6:00 [Bug tree-optimization/107369] New: [13 Regression] ICE: verify_flow_info failed (error: label 'l1' has incorrect context in bb 2) asolokha at gmx dot com
2022-10-24 8:04 ` [Bug tree-optimization/107369] " marxin at gcc dot gnu.org
2022-10-24 8:50 ` jakub at gcc dot gnu.org
2022-10-24 13:17 ` rguenth at gcc dot gnu.org
2022-10-25 8:42 ` cvs-commit at gcc dot gnu.org
2022-10-25 8:51 ` jakub at gcc dot gnu.org
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).