public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy
@ 2023-10-23 18:45 mjires at suse dot cz
2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: mjires at suse dot cz @ 2023-10-23 18:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111943
Bug ID: 111943
Summary: ICE in gimple_split_edge, at tree-cfg.cc:3019 on
20050510-1.c with new -fharden-control-flow-redundancy
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
Target Milestone: ---
Following testcase causes ICE with new -fharden-control-flow-redundancy
$ cat 20050510-1.c
/* { dg-require-effective-target indirect_jumps } */
/* { dg-require-effective-target label_values } */
void bar (int k)
{
void *label = (k) ? &&x : &&y;
if (k)
goto *label;
x:
if (k)
dont_remove ();
y:
return;
}
$ gcc 20050510-1.c -fharden-control-flow-redundancy
--param=max-jump-thread-duplication-stmts=0 -Ofast
20050510-1.c: In function ‘bar’:
20050510-1.c:12:5: warning: implicit declaration of function ‘dont_remove’
[-Wimplicit-function-declaration]
12 | dont_remove ();
| ^~~~~~~~~~~
during GIMPLE pass: hardcfr
20050510-1.c:4:6: internal compiler error: in gimple_split_edge, at
tree-cfg.cc:3019
4 | void bar (int k)
| ^~~
0x7f2c1b gimple_split_edge
/home/mjires/git/GCC/master/gcc/tree-cfg.cc:3019
0xad6acb split_edge(edge_def*)
/home/mjires/git/GCC/master/gcc/cfghooks.cc:670
0xc83916 gimple_find_edge_insert_loc
/home/mjires/git/GCC/master/gcc/gimple-iterator.cc:829
0xc8457b gsi_insert_seq_on_edge_immediate(edge_def*, gimple*)
/home/mjires/git/GCC/master/gcc/gimple-iterator.cc:873
0x1d5468e rt_bb_visited::insert_exit_check_on_edge(gimple*, edge_def*)
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:706
0x1d5468e rt_bb_visited::check(auto_vec<edge_def*, 10ul>&, int, auto_sbitmap
const&)
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:807
0x1d530b6 execute
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:1476
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/checks/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/checks/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/checks/master
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231023 (experimental) (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos
2023-10-23 18:45 [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy mjires at suse dot cz
@ 2023-10-26 11:47 ` aoliva at gcc dot gnu.org
2023-10-31 12:34 ` cvs-commit at gcc dot gnu.org
2023-10-31 12:36 ` aoliva at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: aoliva at gcc dot gnu.org @ 2023-10-26 11:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111943
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-10-26
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org
--- Comment #1 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 56315
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56315&action=edit
candidate patch under test
Mine. Thanks for the report, testing a fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos
2023-10-23 18:45 [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy mjires at suse dot cz
2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
@ 2023-10-31 12:34 ` cvs-commit at gcc dot gnu.org
2023-10-31 12:36 ` aoliva at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-31 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111943
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:
https://gcc.gnu.org/g:15404016d96dca9132b952980cda24cae33b3ee0
commit r14-5033-g15404016d96dca9132b952980cda24cae33b3ee0
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Oct 31 09:32:08 2023 -0300
hardcfr: support checking at abnormal edges [PR111943]
Control flow redundancy may choose abnormal edges for early checking,
but that breaks because we can't insert checks on such edges.
Introduce conditional checking on the dest block of abnormal edges,
and leave it for the optimizer to drop the conditional.
for gcc/ChangeLog
PR tree-optimization/111943
* gimple-harden-control-flow.cc: Adjust copyright year.
(rt_bb_visited): Add vfalse and vtrue data members.
Zero-initialize them in the ctor.
(rt_bb_visited::insert_exit_check_on_edge): Upon encountering
abnormal edges, insert initializers for vfalse and vtrue on
entry, and insert the check sequence guarded by a conditional
in the dest block.
for libgcc/ChangeLog
* hardcfr.c: Adjust copyright year.
for gcc/testsuite/ChangeLog
PR tree-optimization/111943
* gcc.dg/harden-cfr-pr111943.c: New.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos
2023-10-23 18:45 [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy mjires at suse dot cz
2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
2023-10-31 12:34 ` cvs-commit at gcc dot gnu.org
@ 2023-10-31 12:36 ` aoliva at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: aoliva at gcc dot gnu.org @ 2023-10-31 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111943
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Fixed
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-31 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 18:45 [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy mjires at suse dot cz
2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
2023-10-31 12:34 ` cvs-commit at gcc dot gnu.org
2023-10-31 12:36 ` aoliva 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).