aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-12-08 06:32:24 -0800
committerDmitry Vyukov <dvyukov@gcc.gnu.org>2016-12-08 06:32:24 -0800
commit04bfa1e4691afb9eb0edcd9e80ec1e542628c7d4 (patch)
tree716c3a27d9d026e9a845aa1d821bc784d6972c30 /gcc/opts.c
parent48d73a936497f71a489b8708b34e210bd02c06eb (diff)
downloadgcc-04bfa1e4691afb9eb0edcd9e80ec1e542628c7d4.zip
gcc-04bfa1e4691afb9eb0edcd9e80ec1e542628c7d4.tar.gz
gcc-04bfa1e4691afb9eb0edcd9e80ec1e542628c7d4.tar.bz2
Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled
2016-12-08 Dmitry Vyukov <dvyukov@google.com> * opts.c (finish_options): Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled (not -fsanitize=kernel-address). * doc/invoke.texi (-fsanitize=kernel-address): Don't say that it enables -fsanitize-address-use-after-scope. From-SVN: r243441
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index c61c367..890da03 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -990,7 +990,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
/* Enable -fsanitize-address-use-after-scope if address sanitizer is
enabled. */
- if (opts->x_flag_sanitize
+ if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS)
&& !opts_set->x_flag_sanitize_address_use_after_scope)
opts->x_flag_sanitize_address_use_after_scope = true;