8e480ec1dd
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. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.