Go to file
Alexandre Oliva 460bdc0ad8 [bootstrap-O3] use unsigned type for regno in df-scan
This patch fixes a false-positive warning in df-scan, at bootstrap-O3
failed, and enables GCC to optimize out the code that leads to the
warning.

df_ref_create_structure was inlined into the else part of
df_ref_record.  Due to the condition of the corresponding if, In the
else part, VRP deduced unsigned regno >= FIRST_PSEUDO_REGISTER.

In df_ref_create_structure, there's another regno variable,
initialized with the same expression and value as the caller's.  GCC
can tell as much, but this regno variable is signed.  It is used,
shifted right, to index a hard regset bit array within a path that
tests that this signed regno < FIRST_PSEUDO_REGISTER.

GCC warned about the possible out-of-range indexing into the hard
regset array.  It shouldn't, after all, the same regno can't possibly
be both < FIRST_PSEUDO_REGISTER and >= FIRST_PSEUDO_REGISTER, can it?

Well, the optimizers correctly decide it could, if it was a negative
int that, when converted to unsigned, became larger than
FIRST_PSEUDO_REGISTER.  But GCC doesn't know regno can't be negative,
so the test could not be optimize out.  What's more, given the
constraints, VRP correctly concluded the hard regset array would
always be indexed by a value way outside the array index range.

This patch changes the inlined regno to unsigned, like the caller's,
so that we can now tell the conditions can't both hold, so we optimize
out the path containing the would-be out-of-range array indexing.

for  gcc/ChangeLog

	* df-scan.c (df_ref_create_structure): Make regno unsigned,
	to match the caller.

From-SVN: r244090
2017-01-05 01:46:41 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
config Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
contrib update-copyright.py (GCCCmdLine): Add include, libcc1, libiberty, libssp, libvtv and lto-plugin to default_dirs. 2017-01-04 18:14:18 +01:00
fixincludes Don't define libstdc++-internal macros in Solaris 10+ <math.h> 2016-11-21 16:09:47 +00:00
gcc [bootstrap-O3] use unsigned type for regno in df-scan 2017-01-05 01:46:41 +00:00
gnattools configure.ac: Add ACX_NONCANONICAL_HOST. 2016-05-16 08:55:12 +00:00
gotools Update copyright dates 2016-06-07 08:54:22 +00:00
include [DWARF] New DWARF operation "DW_OP_AARCH64_operation" for AArch64 2017-01-04 14:25:04 +00:00
intl config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libada Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
libatomic Update copyright years. 2017-01-01 13:07:43 +01:00
libbacktrace Update copyright years. 2017-01-01 13:07:43 +01:00
libcc1 Update copyright years. 2017-01-04 12:30:51 +01:00
libcilkrts Import libcilkrts Build 4467 (PR target/68945) 2016-12-01 14:48:49 +00:00
libcpp * pt_BR.po, ru.po: Update. 2017-01-05 00:04:28 +00:00
libdecnumber Update copyright years. 2017-01-01 13:07:43 +01:00
libffi config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libgcc Make MIPS soft-fp preserve NaN payloads for NAN2008. 2017-01-04 17:06:33 +00:00
libgfortran PR 78534 Revert r244011 2017-01-03 20:01:30 +02:00
libgo runtime: remove __go_alloc and __go_free 2017-01-03 22:58:48 +00:00
libgomp Update copyright years. 2017-01-01 13:07:43 +01:00
libiberty Update copyright years. 2017-01-04 12:30:51 +01:00
libitm Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
libmpx libtool-version: New version. 2016-12-27 15:35:19 +00:00
libobjc Update copyright years. 2017-01-01 13:07:43 +01:00
liboffloadmic config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libquadmath gcc.c (process_command): Update copyright notice dates. 2017-01-01 12:31:28 +01:00
libsanitizer Add PR sanitizer/78532 patch to libsanitizer/LOCAL_PATCHES. 2016-11-30 14:32:55 +02:00
libssp Update copyright years. 2017-01-04 12:30:51 +01:00
libstdc++-v3 PR78968 add configure check for __cxa_thread_atexit in libc 2017-01-04 15:41:19 +00:00
libvtv Update copyright years. 2017-01-04 12:30:51 +01:00
lto-plugin Update copyright years. 2017-01-04 12:30:51 +01:00
maintainer-scripts re PR web/50642 (onlinedocs formated text too small to read) 2016-09-04 19:38:05 +00:00
zlib config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
.dir-locals.el * .dir-locals.el: Add. 2013-10-16 18:25:31 +00:00
.gitattributes add basic .gitattributes files to notice whitespace issues 2016-04-23 02:37:43 +00:00
.gitignore .gitignore: Ignore in-tree prerequisites. 2016-09-09 17:20:55 -04:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS (Write After Approval): Add myself. 2016-12-26 10:28:02 +00:00
Makefile.def Makefile.def: Remove reference to boehm-gc target module. 2016-11-30 00:12:45 +00:00
Makefile.in Makefile.def: Remove reference to boehm-gc target module. 2016-11-30 00:12:45 +00:00
Makefile.tpl Makefile.def: Remove references to GCJ. 2016-11-15 17:29:12 +00:00
README * README: Document use of ranges of years in copyright notices. 2012-07-16 15:01:34 +01:00
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
config.guess config.guess: Import latest version. 2016-11-25 08:38:27 +11:00
config.rpath
config.sub * config.sub: Import latest version. 2016-12-29 22:04:53 +11:00
configure Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
configure.ac configure.ac: Don't bootstrap libmpx unless --with-build-config includes bootstrap-mpx. 2016-12-21 12:28:40 +01:00
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 * libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols. 2015-11-26 08:20:59 -05:00
ltgcc.m4
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788) 2014-02-04 09:31:38 +00:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

README

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.