Go to file
David Malcolm 6a81cabc14 analyzer: fixes to tree_cmp and other comparators
region_model.cc's tree_cmp attempted to verify that the ordering
is symmetric by asserting that
  tree_cmp (x, y) == -tree_cmp (y, x)

This condition is too strong: it's only required for a comparator that
  sign (tree_cmp (x, y)) == -sign (tree_cmp (y, x))
and the incorrect form of the assertion doesn't hold e.g. on s390x where
for certain inputs x, y, tree_cmp (x, y) == 1 and tree_cmp (y, x) == -2,
breaking the build in "make selftest" in stage1.

In any case, these checks are redundant, since qsort_chk performs them.

Additionally, there is a potential lack of transitivity in
worklist::key_t::cmp where hashval_t values are compared by subtraction,
which could fail to be transitive if overflows occur.

This patch eliminates the redundant checks and reimplements the hashval_t
comparisons in terms of < and >, fixing these issues.

gcc/analyzer/ChangeLog:
	* call-string.cc (call_string::cmp_1): Delete, moving body to...
	(call_string::cmp): ...here.
	* call-string.h (call_string::cmp_1): Delete decl.
	* engine.cc (worklist::key_t::cmp_1): Delete, moving body to...
	(worklist::key_t::cmp): ...here.  Implement hash comparisons
	via comparison rather than subtraction to avoid overflow issues.
	* exploded-graph.h (worklist::key_t::cmp_1): Delete decl.
	* region-model.cc (tree_cmp): Eliminate buggy checking for
	symmetry.
2020-01-27 10:18:42 -05:00
INSTALL
config Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
contrib contrib: Change 'remote' for personal branches and add branch creation script 2020-01-24 14:38:16 +00:00
fixincludes Fix missing SCNuMAX defines in inttypes.h on hpux11.[01]* 2020-01-25 12:20:24 -05:00
gcc analyzer: fixes to tree_cmp and other comparators 2020-01-27 10:18:42 -05:00
gnattools PR81878: fix --disable-bootstrap --enable-languages=ada 2018-11-20 00:07:47 +00:00
gotools libgo: update to Go1.14beta1 2020-01-21 23:53:22 -08:00
include OpenACC 'acc_get_property' cleanup 2020-01-10 23:24:36 +01:00
intl iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
libada Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libatomic Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libbacktrace Update copyright years. 2020-01-01 12:51:42 +01:00
libcc1 init.c (build_new): Add location_t parameter and use it throughout. 2020-01-07 17:58:18 +00:00
libcpp Remove bogus __has_include controlling macro 2020-01-24 04:19:36 -08:00
libdecnumber Update copyright years. 2020-01-01 12:51:42 +01:00
libffi Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libgcc [ARC] Make libgcc compatible with ARC's reduced register set config. 2020-01-27 14:51:03 +02:00
libgfortran Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libgo libgo: handle --with-toolexeclibdir=. 2020-01-24 06:33:46 -08:00
libgomp Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libhsail-rt Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libiberty [libiberty] output empty args as a pair of quotes 2020-01-23 16:45:24 -03:00
libitm Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libobjc Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
liboffloadmic Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libphobos Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libquadmath Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libsanitizer Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libssp Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libstdc++-v3 libstdc++: Fix deduction guide for std::span (PR93426) 2020-01-27 10:55:19 +00:00
libvtv Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
lto-plugin Update copyright years. 2020-01-01 12:51:42 +01:00
maintainer-scripts Replace update_web_docs_libstdcxx_svn with update_web_docs_libstdcxx_git 2020-01-13 21:40:44 +00:00
zlib Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
.dir-locals.el
.gitattributes Add *.md diff=md. 2020-01-15 14:29:53 +01:00
.gitignore Add .clangd and compile_commands.json to .gitignore. 2019-08-28 19:33:28 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Add *.md diff=md. 2020-01-15 14:29:53 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Update my email address. 2020-01-13 22:10:14 +03:00
Makefile.def Sync top-level change from gdb 2019-06-15 21:32:03 +00:00
Makefile.in Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
Makefile.tpl Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
README
ar-lib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in MSP430: Add -fno-exceptions multilib 2019-12-11 19:19:50 +00:00
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure configure.ac: Factor out common cases for compare_exclusions. 2019-12-11 20:59:35 +00:00
configure.ac configure.ac: Factor out common cases for compare_exclusions. 2019-12-11 20:59:35 +00: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
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh libtool.m4: Sort output of 'find' to enable deterministic builds. 2018-07-05 13:13:45 -06: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
multilib.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
symlink-tree
test-driver Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
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.