public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518
@ 2023-02-20 6:49 asolokha at gmx dot com
2023-02-20 8:34 ` [Bug tree-optimization/108855] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2023-02-20 6:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
Bug ID: 108855
Summary: [13 Regression] ICE in eliminate_unnecessary_stmts, at
tree-ssa-dce.cc:1518
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc 13.0.1 20230219 snapshot (g:b9c83e7789f7eec9871e370739baa55fd70be4cf) ICEs
when compiling the following testcase w/ -O1:
int m;
int
undefined (int);
__attribute__ ((pure, returns_twice)) int
bar (void)
{
m = 1;
while (m)
m = 2;
return m;
}
int
foo (void)
{
return undefined (bar ());
}
% gcc-13 -O1 -c gl1ueszy.c
during GIMPLE pass: dce
gl1ueszy.c: In function 'foo':
gl1ueszy.c:17:1: internal compiler error: in eliminate_unnecessary_stmts, at
tree-ssa-dce.cc:1518
17 | foo (void)
| ^~~
0x77557c eliminate_unnecessary_stmts
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1518
0x77557c perform_tree_ssa_dce
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1951
0x102b6da tree_ssa_dce
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1986
0x102b6da execute
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:2027
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/108855] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518
2023-02-20 6:49 [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 asolokha at gmx dot com
@ 2023-02-20 8:34 ` rguenth at gcc dot gnu.org
2023-02-20 9:21 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-20 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |13.0
Last reconfirmed| |2023-02-20
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Meh, another one ...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/108855] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518
2023-02-20 6:49 [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 asolokha at gmx dot com
2023-02-20 8:34 ` [Bug tree-optimization/108855] " rguenth at gcc dot gnu.org
@ 2023-02-20 9:21 ` rguenth at gcc dot gnu.org
2023-02-21 9:33 ` cvs-commit at gcc dot gnu.org
2023-02-21 9:34 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-20 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So early CD-DCE figures that there's no longjmp in this function(?) but then
late modref/pure-const discovers bar() is actually noreturn and fixup-CFG
turns foo into
int foo ()
{
int D.2764;
int _1(D);
<bb 2> [local count: 1073741824]:
bar ();
}
because the call is said to be not control altering. But then the next DCE
chokes on this because now it _is_ control altering (fixup-CFG made it so
in fixup noreturn calls).
So this is again returns_twice + noreturn, but it also shows the per-stmt
control-altering overloading all control-altering attributes isn't fine
grained enough(?).
Note we're not setting ctrl-altering initially here, returns-twice doesn't
alter control flow but instead it receives control from elsewhere. In
that light the previous fix for PR108691 was probably wrong.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/108855] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518
2023-02-20 6:49 [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 asolokha at gmx dot com
2023-02-20 8:34 ` [Bug tree-optimization/108855] " rguenth at gcc dot gnu.org
2023-02-20 9:21 ` rguenth at gcc dot gnu.org
@ 2023-02-21 9:33 ` cvs-commit at gcc dot gnu.org
2023-02-21 9:34 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-21 9:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
--- 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:e79b9db15e410c4652438ffbbc44b6aa04e1ba61
commit r13-6152-ge79b9db15e410c4652438ffbbc44b6aa04e1ba61
Author: Richard Biener <rguenther@suse.de>
Date: Tue Feb 21 10:31:29 2023 +0100
tree-optimization/108855 - new testcase
New testcase for the fixed bug.
PR tree-optimization/108855
* gcc.dg/pr108855.c: New testcase.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/108855] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518
2023-02-20 6:49 [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 asolokha at gmx dot com
` (2 preceding siblings ...)
2023-02-21 9:33 ` cvs-commit at gcc dot gnu.org
@ 2023-02-21 9:34 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-21 9:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The offending patch was reverted.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-21 9:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 6:49 [Bug tree-optimization/108855] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 asolokha at gmx dot com
2023-02-20 8:34 ` [Bug tree-optimization/108855] " rguenth at gcc dot gnu.org
2023-02-20 9:21 ` rguenth at gcc dot gnu.org
2023-02-21 9:33 ` cvs-commit at gcc dot gnu.org
2023-02-21 9:34 ` 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).