public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault
@ 2024-02-01 15:58 zhendong.su at inf dot ethz.ch
2024-02-01 16:10 ` [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683 jakub at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2024-02-01 15:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
Bug ID: 113707
Summary: ICE on valid code at -O1 on x86_64-linux-gnu:
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: ---
This appears to be a very recent regression (as it doesn't seem to reproduce
with the latest build from Compiler Explorer).
[532] % 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/14.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
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.1 20240201 (experimental) (GCC)
[533] %
[533] % gcctk -O1 small.c
during GIMPLE pass: cunroll
small.c: In function ‘main’:
small.c:6:5: internal compiler error: Segmentation fault
6 | int main() {
| ^~~~
0x1161623 crash_signal
../../gcc-trunk/gcc/toplev.cc:317
0x7f2d02c7308f ???
/build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xda0c28 extract_ops_from_tree(tree_node*, tree_code*, tree_node**,
tree_node**, tree_node**)
../../gcc-trunk/gcc/gimple-expr.cc:530
0xd980e0 gimple_build_assign(tree_node*, tree_node*)
../../gcc-trunk/gcc/gimple.cc:454
0x137c91c eliminate_dom_walker::eliminate_cleanup(bool)
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:7494
0x13917db do_rpo_vn_1
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8720
0x13923b3 do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool, bool,
vn_lookup_kind)
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8749
0x12df179 tree_unroll_loops_completely
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1554
0x12df2b3 execute
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1673
0x12df2b3 execute
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1663
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.
[534] %
[534] % cat small.c
int printf(const char *, ...);
struct a {
int b;
} n;
int a, c, d, e, f = 1, g, h, j = 1, k, l, m, o;
int main() {
struct a p;
int i;
p.b = 1;
if (!j)
goto q;
p.b = i = 0;
for (; i < 1; i++)
if (k)
while (m)
r:
q:
if (p.b)
g = 1;
while (1) {
i = 0;
for (; i < 5; i++)
;
if (l) {
while (h)
;
if (o) {
d = 0;
for (; d < 8; d++)
;
}
}
for (; e; e--)
while (a)
p = n;
if (c)
goto r;
printf("0");
if (f)
break;
}
return 0;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
@ 2024-02-01 16:10 ` jakub at gcc dot gnu.org
2024-02-01 17:40 ` zhendong.su at inf dot ethz.ch
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-01 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on valid code at -O1 on |[14 Regression] ICE on
|x86_64-linux-gnu: |valid code at -O1 on
|Segmentation fault |x86_64-linux-gnu:
| |Segmentation fault since
| |r14-8683
Priority|P3 |P1
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Target Milestone|--- |14.0
Version|unknown |14.0
CC| |jakub at gcc dot gnu.org
Last reconfirmed| |2024-02-01
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-8683-gb84f8a5e0a7ef3e5bd0d186fc7e280d9c43c5b7f
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
2024-02-01 16:10 ` [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683 jakub at gcc dot gnu.org
@ 2024-02-01 17:40 ` zhendong.su at inf dot ethz.ch
2024-02-05 8:24 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2024-02-01 17:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
--- Comment #2 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another related test for -O3 (only):
[555] % gcctk -O3 small.c
during GIMPLE pass: cunroll
small.c: In function ‘main’:
small.c:14:5: internal compiler error: Segmentation fault
14 | int main() {
| ^~~~
0x1161623 crash_signal
../../gcc-trunk/gcc/toplev.cc:317
0x7fa97fd5308f ???
/build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xda0c28 extract_ops_from_tree(tree_node*, tree_code*, tree_node**,
tree_node**, tree_node**)
../../gcc-trunk/gcc/gimple-expr.cc:530
0xd980e0 gimple_build_assign(tree_node*, tree_node*)
../../gcc-trunk/gcc/gimple.cc:454
0x137c91c eliminate_dom_walker::eliminate_cleanup(bool)
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:7494
0x13917db do_rpo_vn_1
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8720
0x13923b3 do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool, bool,
vn_lookup_kind)
../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8749
0x12df179 tree_unroll_loops_completely
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1554
0x12df2b3 execute
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1673
0x12df2b3 execute
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1663
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, b, c, d, e, f, g, h, j, k, l;
void n() {
while (c)
if (1) {
for (h = 5; h; h--) {
int m = e % 2;
d = ~g || h ^ m / -1;
if (h > 5)
e = k;
}
return;
}
}
int main() {
if (a)
for (int i = 0; i < 2; i++) {
for (f = 1; f < 6; f++)
for (c = 7; c >= 0; c--)
if (l)
b = 0;
n();
}
return 0;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
2024-02-01 16:10 ` [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683 jakub at gcc dot gnu.org
2024-02-01 17:40 ` zhendong.su at inf dot ethz.ch
@ 2024-02-05 8:24 ` rguenth at gcc dot gnu.org
2024-02-05 8:44 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-05 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2024-02-05 8:24 ` rguenth at gcc dot gnu.org
@ 2024-02-05 8:44 ` rguenth at gcc dot gnu.org
2024-02-05 8:51 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-05 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It shows two issues. One we do too many LC-SSA preserving avails, the other
that eliminate_avail can result in different answers for the same name
dependent on later avails - that's of course not OK.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
` (3 preceding siblings ...)
2024-02-05 8:44 ` rguenth at gcc dot gnu.org
@ 2024-02-05 8:51 ` rguenth at gcc dot gnu.org
2024-02-05 10:07 ` cvs-commit at gcc dot gnu.org
2024-02-05 10:08 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-05 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |shaohua.li at inf dot ethz.ch
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 113725 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
` (4 preceding siblings ...)
2024-02-05 8:51 ` rguenth at gcc dot gnu.org
@ 2024-02-05 10:07 ` cvs-commit at gcc dot gnu.org
2024-02-05 10:08 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-05 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
--- Comment #6 from GCC 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:42959acb8409c39e1c71c43528832611c3b71e25
commit r14-8800-g42959acb8409c39e1c71c43528832611c3b71e25
Author: Richard Biener <rguenther@suse.de>
Date: Mon Feb 5 09:44:12 2024 +0100
tree-optimization/113707 - ICE with VN elimination
The following avoids different avail answers depending on how the
iteration progressed.
PR tree-optimization/113707
* tree-ssa-sccvn.cc (rpo_elim::eliminate_avail): After
checking the avail set treat out-of-region defines as
available.
* gcc.dg/torture/pr113707-1.c: New testcase.
* gcc.dg/torture/pr113707-2.c: Likewise.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
` (5 preceding siblings ...)
2024-02-05 10:07 ` cvs-commit at gcc dot gnu.org
@ 2024-02-05 10:08 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-05 10:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-02-05 10:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 15:58 [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
2024-02-01 16:10 ` [Bug tree-optimization/113707] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r14-8683 jakub at gcc dot gnu.org
2024-02-01 17:40 ` zhendong.su at inf dot ethz.ch
2024-02-05 8:24 ` rguenth at gcc dot gnu.org
2024-02-05 8:44 ` rguenth at gcc dot gnu.org
2024-02-05 8:51 ` rguenth at gcc dot gnu.org
2024-02-05 10:07 ` cvs-commit at gcc dot gnu.org
2024-02-05 10:08 ` rguenth 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).