+2019-08-19 Kito Cheng <kito.cheng@sifive.com>
+
+ PR target/91441
+ * toplev.c (process_options): Check TARGET_ASAN_SHADOW_OFFSET is
+ implemented for -fsanitize=kernel-address, and merge check logic
+ with -fsanitize=address.
+
2019-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts
/* Address Sanitizer needs porting to each target architecture. */
if ((flag_sanitize & SANITIZE_ADDRESS)
- && !FRAME_GROWS_DOWNWARD)
+ && (!FRAME_GROWS_DOWNWARD || targetm.asan_shadow_offset == NULL))
{
warning_at (UNKNOWN_LOCATION, 0,
"%<-fsanitize=address%> and %<-fsanitize=kernel-address%> "
flag_sanitize &= ~SANITIZE_ADDRESS;
}
- if ((flag_sanitize & SANITIZE_USER_ADDRESS)
- && targetm.asan_shadow_offset == NULL)
- {
- warning_at (UNKNOWN_LOCATION, 0,
- "%<-fsanitize=address%> not supported for this target");
- flag_sanitize &= ~SANITIZE_ADDRESS;
- }
-
/* Do not use IPA optimizations for register allocation if profiler is active
or patchable function entries are inserted for run-time instrumentation
or port does not emit prologue and epilogue as RTL. */