From 5843a5f0a2d875ac67b098e6a8eae0501e31fe16 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 13 Jun 2016 09:17:16 +0200 Subject: 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 --- gcc/toplev.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/toplev.c') 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. */ -- cgit v1.1