re PR middle-end/82694 (Linux kernel miscompiled since r250765)
authorJakub Jelinek <jakub@redhat.com>
Mon, 15 Jan 2018 09:05:59 +0000 (10:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 15 Jan 2018 09:05:59 +0000 (10:05 +0100)
commit3fccbb9ecec7daa3b6468f72379c0bd1fb5bb8d9
tree08c17fa7abe77e42e46b0fdf6d49c9bdf48fc9a0
parent2aa89839f557b7467704ddffa4dc43a130e8d027
re PR middle-end/82694 (Linux kernel miscompiled since r250765)

PR middle-end/82694
* common.opt (fstrict-overflow): No longer an alias.
(fwrapv-pointer): New option.
* tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
also for pointer types based on flag_wrapv_pointer.
* opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
opts->x_flag_wrapv got set.
* fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
POINTER_TYPE_OVERFLOW_UNDEFINED.
* match.pd: Likewise in address comparison pattern.
* doc/invoke.texi: Document -fwrapv and -fstrict-overflow.

* gcc.dg/no-strict-overflow-7.c: Revert 2017-08-01 changes.
* gcc.dg/tree-ssa/pr81388-1.c: Likewise.

From-SVN: r256686
gcc/ChangeLog
gcc/common.opt
gcc/doc/invoke.texi
gcc/fold-const.c
gcc/match.pd
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/no-strict-overflow-7.c
gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c
gcc/tree.h