aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-03-09 11:04:50 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-03-09 10:04:50 +0000
commit3828bb0d7ed18e03d0794c0a38a51d155421559c (patch)
tree575b01bb27c1e7c07555d84dff66757d77c3412c /gcc/toplev.c
parent410a590c2a718861487e2fc354da02c1394bbcb1 (diff)
downloadgcc-3828bb0d7ed18e03d0794c0a38a51d155421559c.zip
gcc-3828bb0d7ed18e03d0794c0a38a51d155421559c.tar.gz
gcc-3828bb0d7ed18e03d0794c0a38a51d155421559c.tar.bz2
Disable -fcheck-pointer-bounds with sanitizers.
2017-03-09 Martin Liska <mliska@suse.cz> PR target/65705 PR target/69804 * toplev.c (process_options): Disable -fcheck-pointer-bounds with sanitizers. 2017-03-09 Martin Liska <mliska@suse.cz> PR target/65705 PR target/69804 * gcc.target/i386/pr71458.c: Update scanned pattern. From-SVN: r245997
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index beb581a..6a7e4fb 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1274,22 +1274,30 @@ process_options (void)
flag_check_pointer_bounds = 0;
}
- if (flag_sanitize & SANITIZE_ADDRESS)
+ if (flag_sanitize)
{
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Address Sanitizer");
- flag_check_pointer_bounds = 0;
- }
+ if (flag_sanitize & SANITIZE_ADDRESS)
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported with "
+ "Address Sanitizer");
+
+ if (flag_sanitize & (SANITIZE_UNDEFINED | SANITIZE_NONDEFAULT))
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported with "
+ "Undefined Behavior Sanitizer");
+
+ if (flag_sanitize & SANITIZE_LEAK)
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported with "
+ "Leak Sanitizer");
+
+ if (flag_sanitize & SANITIZE_THREAD)
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported with "
+ "Thread Sanitizer");
- 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. */