Fix handling of -fsanitize-recover* options.
authorMartin Liska <mliska@suse.cz>
Mon, 26 Sep 2016 10:55:34 +0000 (12:55 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 26 Sep 2016 10:55:34 +0000 (10:55 +0000)
commit5cc6c41c2ee95585418a5820d34a4356b91dda18
treedfdcff0777887158eb50d49f939f910bd45980c8
parent759a6472610921efcc41de343332b86d197e123c
Fix handling of -fsanitize-recover* options.

* common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN
from default sanitize recover values.
* doc/invoke.texi: Fix documentation related to -fsanitize=leak,
-fsanitize=address, -fsanitize=thread and -fsanitize-recover.
* flag-types.h: Replace couple of 1 << x to 1UL << x, make it
consistent.
* opts.c (finish_options): Do a generic loop over options
that can be recovered.
(parse_sanitizer_options): Exclude SANITIZE_UNREACHABLE and
SANITIZE_RETURN.
(common_handle_option): Likewise.
* opts.h: Declare can_recover to sanitizer_opts_s.
* c-c++-common/ubsan/sanitize-recover-1.c: New test.
* c-c++-common/ubsan/sanitize-recover-2.c: New test.
* c-c++-common/ubsan/sanitize-recover-3.c: New test.
* c-c++-common/ubsan/sanitize-recover-4.c: New test.
* c-c++-common/ubsan/sanitize-recover-5.c: New test.
* c-c++-common/ubsan/sanitize-recover-6.c: New test.
* c-c++-common/ubsan/sanitize-recover-7.c: New test.
* c-c++-common/ubsan/sanitize-recover-8.c: New test.
* c-c++-common/ubsan/sanitize-recover-9.c: New test.

From-SVN: r240491
16 files changed:
gcc/ChangeLog
gcc/common.opt
gcc/doc/invoke.texi
gcc/flag-types.h
gcc/opts.c
gcc/opts.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-4.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c [new file with mode: 0644]