public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
@ 2023-09-27 13:39 shaohua.li at inf dot ethz.ch
2023-09-27 18:36 ` [Bug tree-optimization/111614] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: shaohua.li at inf dot ethz.ch @ 2023-09-27 13:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
Bug ID: 111614
Summary: [14 Regression] ICE at -O2: verify_gimple failed since
r14-2282-gf703d2fd3f0
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: shaohua.li at inf dot ethz.ch
CC: rguenth at gcc dot gnu.org
Target Milestone: ---
gcc at -O2 crashes.
Bisected to r14-2282-gf703d2fd3f0
Compiler explorer: https://godbolt.org/z/xG5Tosvnc
$ cat a.c
int a, b, c, d, e;
static void f() {
int *g = &b;
b = 1;
for (; b >= 0; b--) {
c = 0;
for (; c <= 1; c++)
e = 0;
for (; e <= 1; e++) {
int h, i = h = 13;
for (; h; h--)
i = i << a;
d &= i + c + 9 + *g;
}
}
}
int main() {
f();
for (;;)
;
}
$
$ gcc -O3 a.c
a.c: In function ‘main’:
a.c:17:5: error: type mismatch in binary expression
17 | int main() {
| ^~~~
vector(2) int
vector(2) int
vector(2) unsigned int
_15 = vect__15.28_19 & _11;
during GIMPLE pass: reassoc
a.c:17:5: internal compiler error: verify_gimple failed
0x7f6a86416082 __libc_start_main
../csu/libc-start.c:308
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.
$
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
@ 2023-09-27 18:36 ` pinskia at gcc dot gnu.org
2023-09-27 18:45 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-27 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking,
| |ice-on-valid-code
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
2023-09-27 18:36 ` [Bug tree-optimization/111614] " pinskia at gcc dot gnu.org
@ 2023-09-27 18:45 ` pinskia at gcc dot gnu.org
2023-09-28 7:42 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-27 18:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-09-27
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like a latent bug in reassoc:
```
vector(2) unsigned int _11;
intD.6 _6;
intD.6 _8;
vect__15.28_19 = VIEW_CONVERT_EXPR<vector(2) intD.6>(_3);
_4 = BIT_FIELD_REF <vect__15.28_19, 32, 0>;
_35 = BIT_FIELD_REF <vect__15.28_19, 32, 32>;
_30 = _35 & _4;
_28 = _30 & d_lsm.16_31;
...
_62 = VIEW_CONVERT_EXPR<vector(2) unsigned int>(vect_i_7.24_45);
_11 = _62 + { 11, 11 };
_6 = BIT_FIELD_REF <_11, 32, 0>;
_8 = BIT_FIELD_REF <_11, 32, 32>;
_21 = _8 & _6;
_34 = _21 & _28;
```
basically BIT_FIELD_REF has a type of `int` but the inner vector type of _11 is
`vector unsigned int`.
The VCE was removed by the following match pattern:
```
(simplify
(BIT_FIELD_REF (view_convert @0) @1 @2)
(BIT_FIELD_REF @0 @1 @2))
```
Which you expect really.
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
2023-09-27 18:36 ` [Bug tree-optimization/111614] " pinskia at gcc dot gnu.org
2023-09-27 18:45 ` pinskia at gcc dot gnu.org
@ 2023-09-28 7:42 ` rguenth at gcc dot gnu.org
2023-09-28 9:25 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-28 7:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
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 #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The bug is in undistribute_bitref_for_vector and latent for longer. Mine.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (2 preceding siblings ...)
2023-09-28 7:42 ` rguenth at gcc dot gnu.org
@ 2023-09-28 9:25 ` cvs-commit at gcc dot gnu.org
2023-09-28 9:26 ` [Bug tree-optimization/111614] [11/12/13 " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-28 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
--- 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:88d79b9b03eccf39921d13c2cbd1acc50aeda126
commit r14-4303-g88d79b9b03eccf39921d13c2cbd1acc50aeda126
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11/12/13 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (3 preceding siblings ...)
2023-09-28 9:25 ` cvs-commit at gcc dot gnu.org
@ 2023-09-28 9:26 ` rguenth at gcc dot gnu.org
2023-11-10 14:24 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-28 9:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|14.0 |11.5
Summary|[14 Regression] ICE at -O2: |[11/12/13 Regression] ICE
|verify_gimple failed since |at -O2: verify_gimple
|r14-2282-gf703d2fd3f0 |failed since
| |r14-2282-gf703d2fd3f0
Known to work| |14.0
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk, as said the issue is latent on branches.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11/12/13 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (4 preceding siblings ...)
2023-09-28 9:26 ` [Bug tree-optimization/111614] [11/12/13 " rguenth at gcc dot gnu.org
@ 2023-11-10 14:24 ` cvs-commit at gcc dot gnu.org
2023-11-27 13:09 ` [Bug tree-optimization/111614] [11/12 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-10 14:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:8e8599fc8079cdc2a9ef934c765613e2f0a4cdf9
commit r13-8042-g8e8599fc8079cdc2a9ef934c765613e2f0a4cdf9
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.
(cherry picked from commit 88d79b9b03eccf39921d13c2cbd1acc50aeda126)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11/12 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (5 preceding siblings ...)
2023-11-10 14:24 ` cvs-commit at gcc dot gnu.org
@ 2023-11-27 13:09 ` cvs-commit at gcc dot gnu.org
2023-12-15 12:18 ` [Bug tree-optimization/111614] [11 " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-27 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:e4b5aca4433bd1c6de4ea2585700770bba8eb0d7
commit r12-10013-ge4b5aca4433bd1c6de4ea2585700770bba8eb0d7
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.
(cherry picked from commit 88d79b9b03eccf39921d13c2cbd1acc50aeda126)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (6 preceding siblings ...)
2023-11-27 13:09 ` [Bug tree-optimization/111614] [11/12 " cvs-commit at gcc dot gnu.org
@ 2023-12-15 12:18 ` cvs-commit at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-15 12:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111614
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:03b5888abc9fe9a81df77125a8d4975ab8695c8c
commit r11-11144-g03b5888abc9fe9a81df77125a8d4975ab8695c8c
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.c (undistribute_bitref_for_vector): Properly
convert the first vector when required.
* gcc.dg/torture/pr111614.c: New testcase.
(cherry picked from commit 88d79b9b03eccf39921d13c2cbd1acc50aeda126)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (7 preceding siblings ...)
2023-12-15 12:18 ` [Bug tree-optimization/111614] [11 " cvs-commit at gcc dot gnu.org
@ 2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ 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=111614
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.4.1
Status|ASSIGNED |WAITING
Known to fail| |11.4.0
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/111614] [11 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
` (8 preceding siblings ...)
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
@ 2023-12-15 12:23 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ 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=111614
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-12-15 12:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 13:39 [Bug tree-optimization/111614] New: [14 Regression] ICE at -O2: verify_gimple failed since r14-2282-gf703d2fd3f0 shaohua.li at inf dot ethz.ch
2023-09-27 18:36 ` [Bug tree-optimization/111614] " pinskia at gcc dot gnu.org
2023-09-27 18:45 ` pinskia at gcc dot gnu.org
2023-09-28 7:42 ` rguenth at gcc dot gnu.org
2023-09-28 9:25 ` cvs-commit at gcc dot gnu.org
2023-09-28 9:26 ` [Bug tree-optimization/111614] [11/12/13 " rguenth at gcc dot gnu.org
2023-11-10 14:24 ` cvs-commit at gcc dot gnu.org
2023-11-27 13:09 ` [Bug tree-optimization/111614] [11/12 " cvs-commit at gcc dot gnu.org
2023-12-15 12:18 ` [Bug tree-optimization/111614] [11 " cvs-commit at gcc dot gnu.org
2023-12-15 12:23 ` rguenth at gcc dot gnu.org
2023-12-15 12:23 ` 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).