public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
@ 2023-06-04 21:24 zhendong.su at inf dot ethz.ch
2023-06-04 22:17 ` [Bug tree-optimization/110116] [12/13/14 Regression] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-06-04 21:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Bug ID: 110116
Summary: ICE on valid code at -O3 on x86_64-linux-gnu:
verify_gimple failed
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 recent regression.
Compiler Explorer: https://godbolt.org/z/MTsfTocn7
[635] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/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
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230604 (experimental) [master r14-924-gd709841ae0f] (GCC)
[636] %
[636] % gcctk -O3 small.c
small.c: In function ‘main’:
small.c:6:21: warning: iteration 2147483646 invokes undefined behavior
[-Waggressive-loop-optimizations]
6 | for (b = 1; b; b++)
| ~^~
small.c:6:17: note: within this loop
6 | for (b = 1; b; b++)
| ^
small.c:4:5: error: type mismatch in binary expression
4 | int main() {
| ^~~~
vector(4) char
vector(4) char
vector(4) unsigned char
_73 = vect__48.34_68 & vect__6.22_19;
during GIMPLE pass: reassoc
small.c:4:5: internal compiler error: verify_gimple failed
0x100327e verify_gimple_in_cfg(function*, bool, bool)
../../gcc-trunk/gcc/tree-cfg.cc:5652
0xe98674 execute_function_todo
../../gcc-trunk/gcc/passes.cc:2098
0xe98bcb execute_todo
../../gcc-trunk/gcc/passes.cc:2152
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.
[637] %
[637] % cat small.c
unsigned char a[5];
int b, d;
char c;
int main() {
if (d) {
for (b = 1; b; b++)
c &= d = 1;
for (; d < 5; d++)
c &= a[d];
}
return 0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13/14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
@ 2023-06-04 22:17 ` pinskia at gcc dot gnu.org
2023-06-05 6:51 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-04 22:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on valid code at -O3 on |[12/13/14 Regression] ICE
|x86_64-linux-gnu: |on valid code at -O3 on
|verify_gimple failed |x86_64-linux-gnu:
| |verify_gimple failed
Last reconfirmed| |2023-06-04
Keywords| |ice-checking,
| |ice-on-valid-code,
| |needs-bisection
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |12.4
Known to fail| |12.1.0, 12.2.0, 12.3.0,
| |13.1.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> It appears to be a recent regression.
It is not. `-O3 -fchecking=2` ICEs all the way back to GCC 12.1.0
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13/14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
2023-06-04 22:17 ` [Bug tree-optimization/110116] [12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2023-06-05 6:51 ` rguenth at gcc dot gnu.org
2023-11-01 19:22 ` tkoenig at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-05 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |13.1.1
Priority|P3 |P2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13/14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
2023-06-04 22:17 ` [Bug tree-optimization/110116] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-06-05 6:51 ` rguenth at gcc dot gnu.org
@ 2023-11-01 19:22 ` tkoenig at gcc dot gnu.org
2023-11-02 18:29 ` [Bug tree-optimization/110116] [12/13 " tkoenig at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2023-11-01 19:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Looks like this has been fixed in the meantime:
tkoenig@gcc188:~> gcc -O3 small.c
small.c: In function 'main':
small.c:6:21: warning: iteration 2147483646 invokes undefined behavior
[-Waggressive-loop-optimizations]
6 | for (b = 1; b; b++)
| ~^~
small.c:6:17: note: within this loop
6 | for (b = 1; b; b++)
| ^
tkoenig@gcc188:~> gcc --version
gcc (GCC) 14.0.0 20231101 (experimental) [master r13-4915-g9b111debbfb]
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
tkoenig@gcc188:~> cat small.c
unsigned char a[5];
int b, d;
char c;
int main() {
if (d) {
for (b = 1; b; b++)
c &= d = 1;
for (; d < 5; d++)
c &= a[d];
}
return 0;
}
Still interesting which revision fixed it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2023-11-01 19:22 ` tkoenig at gcc dot gnu.org
@ 2023-11-02 18:29 ` tkoenig at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2024-05-08 11:56 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2023-11-02 18:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12/13/14 Regression] ICE |[12/13 Regression] ICE on
|on valid code at -O3 on |valid code at -O3 on
|x86_64-linux-gnu: |x86_64-linux-gnu:
|verify_gimple failed |verify_gimple failed
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=111614
Known to work| |14.0
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
r14-4303-g88d79b9b03eccf fixed it:
88d79b9b03eccf39921d13c2cbd1acc50aeda126 is the first fixed commit
commit 88d79b9b03eccf39921d13c2cbd1acc50aeda126
Author: Richard Biener <rguenther@suse.de>
Date: Thu Sep 28 09:41:30 2023 +0200
tree-optimization/111614 - missing convert in
undistribute_bitref_for_vector
The following adjusts a flawed guard for converting the first vector
of the sum we create in undistribute_bitref_for_vector.
PR tree-optimization/111614
* tree-ssa-reassoc.cc (undistribute_bitref_for_vector): Properly
convert the first vector when required.
* gcc.dg/torture/pr111614.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr111614.c | 23 +++++++++++++++++++++++
gcc/tree-ssa-reassoc.cc | 27 +++++++++++++++------------
2 files changed, 38 insertions(+), 12 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr111614.c
Maybe a candidate for backporting? Unlike PR111614, this does not appear
to be latent.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
` (3 preceding siblings ...)
2023-11-02 18:29 ` [Bug tree-optimization/110116] [12/13 " tkoenig at gcc dot gnu.org
@ 2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2024-05-08 11:56 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-15 12:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Bug 110116 depends on bug 111614, which changed state.
Bug 111614 Summary: [11 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110116] [12/13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
` (4 preceding siblings ...)
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
@ 2024-05-08 11:56 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-08 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |13.2.0
Status|NEW |RESOLVED
Known to work| |12.3.1, 13.2.1
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Meanwhile fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-08 11:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 21:24 [Bug tree-optimization/110116] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed zhendong.su at inf dot ethz.ch
2023-06-04 22:17 ` [Bug tree-optimization/110116] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-06-05 6:51 ` rguenth at gcc dot gnu.org
2023-11-01 19:22 ` tkoenig at gcc dot gnu.org
2023-11-02 18:29 ` [Bug tree-optimization/110116] [12/13 " tkoenig at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2024-05-08 11:56 ` 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).