public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94001] [10 Regression] ICE: in fold_convert_loc, at fold-const.c:2435 at -O2
[not found] <bug-94001-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-17 18:56 ` cvs-commit at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-17 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94001
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5de0dc84c75a43f78a03c7cdb7e7c443c641a7fa
commit r9-8385-g5de0dc84c75a43f78a03c7cdb7e7c443c641a7fa
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 4 09:01:59 2020 +0100
tailcall: Fix up process_assignment [PR94001]
When a function returns void or the return value is ignored, ass_var
is NULL_TREE. The tail recursion handling generally assumes DCE has been
performed and so doesn't expect to encounter useless assignments after the
call and expects them to be part of the return value adjustment that need
to be changed into tail recursion additions/multiplications.
process_assignment does some verification and has a way to tell the caller
to try to move dead or whatever other stmts that don't participate in the
return value modifications before it is returned.
For binary rhs assignments it is just fine, neither op0 nor op1 will be
NULL_TREE and thus if *ass_var is NULL_TREE, it will not match, but unary
rhs is handled by only setting op0 to rhs1 and setting op1 to NULL_TREE.
And at this point, NULL_TREE == NULL_TREE and thus we think e.g. the
c_2 = -e_3(D);
dead stmt is actually a return value modification, so we queue it as
multiplication and then create a void type SSA_NAME accumulator for it
and ICE shortly after.
Fixed by making sure op1 == *ass_var comparison is done only if *ass_var.
2020-03-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94001
* tree-tailcall.c (process_assignment): Before comparing op1 to
*ass_var, verify *ass_var is non-NULL.
* gcc.dg/pr94001.c: New test.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-17 18:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-94001-4@http.gcc.gnu.org/bugzilla/>
2020-03-17 18:56 ` [Bug tree-optimization/94001] [10 Regression] ICE: in fold_convert_loc, at fold-const.c:2435 at -O2 cvs-commit 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).