26b538cd81
This patch addresses the ICE in gcc.dg/attr-vector_size.c during make -k check on nvptx-none. The actual ICE looks like: testsuite/gcc.dg/attr-vector_size.c:29:1: internal compiler error: \ in tree_to_shwi, at tree.c:7321 0xf53bf2 tree_to_shwi(tree_node const*) ../../gcc/gcc/tree.c:7321 0xff1969 nvptx_vector_alignment ../../gcc/gcc/config/nvptx/nvptx.c:5105^M The problem is that the caller has ensured that TYPE_SIZE(type) is representable as an unsigned HOST_WIDE_INT, but nvptx_vector_alignment is accessing it as a signed HOST_WIDE_INT which overflows in pathological conditions. Amongst those pathological conditions is that a TYPE_SIZE of zero can sometimes reach this function, prior to an error being emitted. Making sure the result is not less than the mode's alignment and not greater than BIGGEST_ALIGNMENT fixes the ICEs, and generates the expected compile-time error messages. Tested on --target=nvptx-none, with a "make" and "make check" which results in four fewer unexpected failures and three more expected passes. 2020-07-03 Roger Sayle <roger@nextmovesoftware.com> Tom de Vries <tdevries@suse.de> gcc/ChangeLog: PR target/90932 * config/nvptx/nvptx.c (nvptx_vector_alignment): Use tree_to_uhwi to access TYPE_SIZE (type). Return at least the mode's alignment. |
||
---|---|---|
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.