mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 08:00:28 +08:00
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
This commit is contained in:
parent
410a590c2a
commit
3828bb0d7e
@ -1,3 +1,10 @@
|
||||
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 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/79672
|
||||
|
@ -1,3 +1,9 @@
|
||||
2017-03-09 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR target/65705
|
||||
PR target/69804
|
||||
* gcc.target/i386/pr71458.c: Update scanned pattern.
|
||||
|
||||
2017-03-09 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/79672
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* { dg-do compile { target { ! x32 } } } */
|
||||
/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=bounds" } */
|
||||
/* { dg-error "-fcheck-pointer-bounds is not supported with -fsanitize=bounds" "" { target *-*-* } 0 } */
|
||||
/* { dg-error "-fcheck-pointer-bounds is not supported with Undefined Behavior Sanitizer" "" { target *-*-* } 0 } */
|
||||
|
||||
enum {} a[0];
|
||||
void fn1(int);
|
||||
|
34
gcc/toplev.c
34
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");
|
||||
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");
|
||||
|
||||
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user