public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593
@ 2022-05-31 8:10 gcc at olupton dot com
2022-05-31 15:37 ` [Bug tree-optimization/105786] " acoplan at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gcc at olupton dot com @ 2022-05-31 8:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
Bug ID: 105786
Summary: ICE in compute_distributive_range, at
tree-data-ref.cc:593
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at olupton dot com
Target Milestone: ---
The following example:
```
void sink(const char*);
static const char *a;
int main() {
const char *b = a;
for (int i = 0; i < 2; ++i)
while (*b++)
;
sink(b);
return 0;
}
```
produces an ICE at -O2 and above with 12.1:
```
during GIMPLE pass: pcom
<source>: In function 'int main()':
<source>:3:5: internal compiler error: in compute_distributive_range, at
tree-data-ref.cc:593
3 | int main() {
| ^~~~
```
this is reproducible on Compiler Explorer (https://godbolt.org/z/z1zrqrrEs) and
also using 12.1.1 installed via `dnf` in a `fedora:latest` Docker container.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102853 reports a similar error
message, but it says the issue is resolved so opening this new issue seems
justified.
Note that adding
```
void set_a(const char* x) {
a = x;
}
```
so that `a` can be non-null avoids the ICE.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] ICE in compute_distributive_range, at tree-data-ref.cc:593
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
@ 2022-05-31 15:37 ` acoplan at gcc dot gnu.org
2022-06-01 9:22 ` [Bug tree-optimization/105786] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99 acoplan at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-05-31 15:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-05-31
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Known to fail| |13.0
CC| |acoplan at gcc dot gnu.org
--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Confirmed on trunk (on aarch64). I see:
t.c: In function ‘main’:
t.c:3:5: error: invalid (pointer) operands ‘plus_expr’
3 | int main() {
| ^~~~
_5 = _23 + 1B;
during GIMPLE pass: ldist
t.c:3:5: internal compiler error: verify_gimple failed
0xeef45f verify_gimple_in_cfg(function*, bool)
/home/alecop01/toolchain/src/gcc/gcc/tree-cfg.cc:5551
0xd79b3b execute_function_todo
/home/alecop01/toolchain/src/gcc/gcc/passes.cc:2085
0xd7a6ab execute_todo
/home/alecop01/toolchain/src/gcc/gcc/passes.cc:2139
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] 8+ messages in thread
* [Bug tree-optimization/105786] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
2022-05-31 15:37 ` [Bug tree-optimization/105786] " acoplan at gcc dot gnu.org
@ 2022-06-01 9:22 ` acoplan at gcc dot gnu.org
2022-06-01 9:30 ` [Bug tree-optimization/105786] [12/13 Regression] " acoplan at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-06-01 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE in |ICE in
|compute_distributive_range, |compute_distributive_range,
|at tree-data-ref.cc:593 |at tree-data-ref.cc:593
| |since
| |r12-4283-g6f966f06146be7689
| |af471d152e18ff50c609d99
--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
The above ICE started with r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] [12/13 Regression] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
2022-05-31 15:37 ` [Bug tree-optimization/105786] " acoplan at gcc dot gnu.org
2022-06-01 9:22 ` [Bug tree-optimization/105786] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99 acoplan at gcc dot gnu.org
@ 2022-06-01 9:30 ` acoplan at gcc dot gnu.org
2022-06-01 12:01 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-06-01 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefansf at linux dot ibm.com
--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
And with -fno-checking I indeed see the original ICE in
compute_distributive_range instead.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] [12/13 Regression] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
` (2 preceding siblings ...)
2022-06-01 9:30 ` [Bug tree-optimization/105786] [12/13 Regression] " acoplan at gcc dot gnu.org
@ 2022-06-01 12:01 ` rguenth at gcc dot gnu.org
2022-06-01 13:18 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-06-01 12:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
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
Priority|P3 |P2
Target Milestone|--- |12.2
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Testing patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] [12/13 Regression] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
` (3 preceding siblings ...)
2022-06-01 12:01 ` rguenth at gcc dot gnu.org
@ 2022-06-01 13:18 ` cvs-commit at gcc dot gnu.org
2022-06-02 9:40 ` [Bug tree-optimization/105786] [12 " cvs-commit at gcc dot gnu.org
2022-06-02 9:44 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-01 13:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
--- Comment #5 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:57a8fb92ac4161ebbf9381b009e8c5af843e3e5f
commit r13-913-g57a8fb92ac4161ebbf9381b009e8c5af843e3e5f
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jun 1 14:13:01 2022 +0200
tree-optimization/105786 - avoid strlen replacement for pointers
This avoids matching strlen to a pointer result, avoiding ICEing
because of an integer adjustment using PLUS_EXPR on pointers.
2022-06-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/105786
* tree-loop-distribution.cc
(loop_distribution::transform_reduction_loop): Only do strlen
replacement for integer type reductions.
* gcc.dg/torture/pr105786.c: New testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] [12 Regression] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
` (4 preceding siblings ...)
2022-06-01 13:18 ` cvs-commit at gcc dot gnu.org
@ 2022-06-02 9:40 ` cvs-commit at gcc dot gnu.org
2022-06-02 9:44 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-02 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
--- Comment #6 from CVS 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:9f1e32c69d3f0cc04665587c18937a773616c6bd
commit r12-8453-g9f1e32c69d3f0cc04665587c18937a773616c6bd
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jun 1 14:13:01 2022 +0200
tree-optimization/105786 - avoid strlen replacement for pointers
This avoids matching strlen to a pointer result, avoiding ICEing
because of an integer adjustment using PLUS_EXPR on pointers.
2022-06-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/105786
* tree-loop-distribution.cc
(loop_distribution::transform_reduction_loop): Only do strlen
replacement for integer type reductions.
* gcc.dg/torture/pr105786.c: New testcase.
(cherry picked from commit 57a8fb92ac4161ebbf9381b009e8c5af843e3e5f)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/105786] [12 Regression] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
` (5 preceding siblings ...)
2022-06-02 9:40 ` [Bug tree-optimization/105786] [12 " cvs-commit at gcc dot gnu.org
@ 2022-06-02 9:44 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-06-02 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
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:[~2022-06-02 9:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 8:10 [Bug c++/105786] New: ICE in compute_distributive_range, at tree-data-ref.cc:593 gcc at olupton dot com
2022-05-31 15:37 ` [Bug tree-optimization/105786] " acoplan at gcc dot gnu.org
2022-06-01 9:22 ` [Bug tree-optimization/105786] ICE in compute_distributive_range, at tree-data-ref.cc:593 since r12-4283-g6f966f06146be7689af471d152e18ff50c609d99 acoplan at gcc dot gnu.org
2022-06-01 9:30 ` [Bug tree-optimization/105786] [12/13 Regression] " acoplan at gcc dot gnu.org
2022-06-01 12:01 ` rguenth at gcc dot gnu.org
2022-06-01 13:18 ` cvs-commit at gcc dot gnu.org
2022-06-02 9:40 ` [Bug tree-optimization/105786] [12 " cvs-commit at gcc dot gnu.org
2022-06-02 9:44 ` 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).