diff options
author | Martin Liska <mliska@suse.cz> | 2016-06-13 09:17:16 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-06-13 07:17:16 +0000 |
commit | 5843a5f0a2d875ac67b098e6a8eae0501e31fe16 (patch) | |
tree | 0dcb523086920289135e4c45f68360235e4405a0 /gcc/toplev.c | |
parent | 1d1ca0deaa7cd5f3b3fb0393a8ceca94cdb1bc7f (diff) | |
download | gcc-5843a5f0a2d875ac67b098e6a8eae0501e31fe16.zip gcc-5843a5f0a2d875ac67b098e6a8eae0501e31fe16.tar.gz gcc-5843a5f0a2d875ac67b098e6a8eae0501e31fe16.tar.bz2 |
Do not enable -fcheck-pointer-bounds w/ -fsanitize=bounds
PR sanitizer/71458
* toplev.c (process_options): Do not enable -fcheck-pointer-bounds
w/ -fsanitize=bounds.
* gcc.target/i386/pr71458.c: New test.
From-SVN: r237353
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 543b8a3..f51d2cb 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1276,6 +1276,15 @@ process_options (void) "Address Sanitizer"); flag_check_pointer_bounds = 0; } + + if (flag_sanitize & SANITIZE_BOUNDS) + { + error_at (UNKNOWN_LOCATION, + "-fcheck-pointer-bounds is not supported with " + "-fsanitize=bounds"); + flag_check_pointer_bounds = 0; + } + } /* One region RA really helps to decrease the code size. */ |