public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
@ 2023-03-29 5:22 zhendong.su at inf dot ethz.ch
2023-03-29 7:10 ` [Bug tree-optimization/109327] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-03-29 5:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
Bug ID: 109327
Summary: ICE on valid code at -O1 and above with
"-fno-tree-ccp": Segmentation fault
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
It appears to be a very recent regression.
[554] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230329 (experimental) [master r13-6922-g91293ffb6af] (GCC)
[555] %
[555] % gcctk -O1 -fno-tree-ccp small.c
during GIMPLE pass: forwprop
small.c: In function ‘main’:
small.c:11:1: internal compiler error: Segmentation fault
11 | }
| ^
0xeeb24f crash_signal
../../gcc-trunk/gcc/toplev.cc:314
0xbab1a7 phi_nodes_ptr(basic_block_def*)
../../gcc-trunk/gcc/gimple.h:4684
0xbab1a7 gsi_start_phis(basic_block_def*)
../../gcc-trunk/gcc/gimple-iterator.cc:935
0xbab1a7 gsi_for_stmt(gimple*)
../../gcc-trunk/gcc/gimple-iterator.cc:620
0x10314f3 execute
../../gcc-trunk/gcc/tree-ssa-forwprop.cc:4070
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.
[556] %
[556] % cat small.c
int a;
void b(int c) {}
int main() {
int d = 0, *e = &a;
if (d) {
int *f = e;
while (a)
b(e != f);
}
return 0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/109327] ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
@ 2023-03-29 7:10 ` rguenth at gcc dot gnu.org
2023-03-29 7:51 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-29 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |13.0
Last reconfirmed| |2023-03-29
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/109327] ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
2023-03-29 7:10 ` [Bug tree-optimization/109327] " rguenth at gcc dot gnu.org
@ 2023-03-29 7:51 ` rguenth at gcc dot gnu.org
2023-03-29 8:35 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-29 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's really an old issue I think. We record a lattice in forwprop, marking
stmts to be removed. But the early forwprop phase runs on the IL with
the stmt operands not substituted, instead relying on old get_prop_source_stmt
and remove_prop_source_from_use. That mechanism can interfere with the
lattice recorded stmt removal.
Testing a patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/109327] ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
2023-03-29 7:10 ` [Bug tree-optimization/109327] " rguenth at gcc dot gnu.org
2023-03-29 7:51 ` rguenth at gcc dot gnu.org
@ 2023-03-29 8:35 ` cvs-commit at gcc dot gnu.org
2023-03-29 8:37 ` rguenth at gcc dot gnu.org
2023-03-30 16:46 ` [Bug tree-optimization/109327] [13 Regression] " pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-29 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:7fd1d28d2436065da7fc0fe01d787fcdf3c14b83
commit r13-6926-g7fd1d28d2436065da7fc0fe01d787fcdf3c14b83
Author: Richard Biener <rguenther@suse.de>
Date: Wed Mar 29 09:51:58 2023 +0200
tree-optimization/109327 - forwprop stmt removal issue
There's interfering between the to_removed queue and other mechanisms
removing stmts, in this case remove_prop_source_from_use. The following
makes the to_remove queue draining more permissive.
PR tree-optimization/109327
* tree-ssa-forwprop.cc (pass_forwprop::execute): Deal with
already removed stmts when draining to_remove.
* gcc.dg/pr109327.c: New testcase.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/109327] ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2023-03-29 8:35 ` cvs-commit at gcc dot gnu.org
@ 2023-03-29 8:37 ` rguenth at gcc dot gnu.org
2023-03-30 16:46 ` [Bug tree-optimization/109327] [13 Regression] " pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-29 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Keywords| |ice-on-valid-code
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed (it's probably latent on the branches).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/109327] [13 Regression] ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
` (3 preceding siblings ...)
2023-03-29 8:37 ` rguenth at gcc dot gnu.org
@ 2023-03-30 16:46 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-30 16:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109327
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on valid code at -O1 |[13 Regression] ICE on
|and above with |valid code at -O1 and above
|"-fno-tree-ccp": |with "-fno-tree-ccp":
|Segmentation fault |Segmentation fault
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-30 16:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 5:22 [Bug tree-optimization/109327] New: ICE on valid code at -O1 and above with "-fno-tree-ccp": Segmentation fault zhendong.su at inf dot ethz.ch
2023-03-29 7:10 ` [Bug tree-optimization/109327] " rguenth at gcc dot gnu.org
2023-03-29 7:51 ` rguenth at gcc dot gnu.org
2023-03-29 8:35 ` cvs-commit at gcc dot gnu.org
2023-03-29 8:37 ` rguenth at gcc dot gnu.org
2023-03-30 16:46 ` [Bug tree-optimization/109327] [13 Regression] " pinskia 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).