Skip to content
Snippets Groups Projects
Commit 65e82636 authored by Kito Cheng's avatar Kito Cheng
Browse files

PR target/96307: Fix KASAN option checking.

 - Disable kasan if target is unsupported and -fasan-shadow-offset= is not
   given, no matter `--param asan-stack=1` is given or not.

 - Moving KASAN option checking testcase to gcc.dg, those testcase could be
   useful for all other target which not support asan.

 - Verifed on riscv and x86.

gcc/ChangeLog:

	PR target/96307
	* toplev.c (process_options): Remove param_asan_stack checking for kasan
	option checking.

gcc/testsuite/ChangeLog:

	PR target/96307
	* gcc.dg/pr96307.c: New.
	* gcc.target/riscv/pr96260.c: Move this test case from here to ...
	* gcc.dg/pr96260.c: ... here.
	* gcc.target/riscv/pr91441.c: Move this test case from here to ...
	* gcc.dg/pr91441.c: ... here.
	* lib/target-supports.exp (check_effective_target_no_fsanitize_address):
	New proc.
parent f72af3af
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment