That got added with commit
r11-4762-g65e82636bcdb72a878c2e53943e71b15dd9fb22d
"PR target/96307: Fix KASAN option checking", and already fixed up in
commit
r12-3723-g6e6bf4cd21af39a7923bae007517ab43a4c3b36a
"Fix no_fsanitize_address effective target", but I just realized that on, for
example, standard x86_64-pc-linux-gnu, I'm unexpectedly seeing test cases
UNSUPPORTED, due to the effective-target 'no_fsanitize_address' check failing
with:
Executing on host: [...]/build-gcc/gcc/xgcc -B[...]/build-gcc/gcc/ fsanitize_address3454287.c -fdiagnostics-plain-output -fsanitize=address -Wno-complain-wrong-lang -lm -o fsanitize_address3454287.exe (timeout = 300)
spawn [...]
/usr/bin/ld: cannot find libasan_preinit.o: No such file or directory
/usr/bin/ld: cannot find -lasan: No such file or directory
collect2: error: ld returned 1 exit status
compiler exited with status 1
Notice no setup for paths to build-tree libsanitizer. Need to use a proper
'asan.exp' file with 'asan_init'/'asan_finish' calls to set up linker paths,
etc. -- however, all test cases using effective-target 'no_fsanitize_address'
are compilation test cases, so let's just reflect that in the effective-target
'no_fsanitize_address' check. With that, I then get the desired:
-UNSUPPORTED: gcc.dg/pr91441.c
+PASS: gcc.dg/pr91441.c (test for excess errors)
-UNSUPPORTED: gcc.dg/pr96260.c
+PASS: gcc.dg/pr96260.c (test for excess errors)
-UNSUPPORTED: gcc.dg/pr96307.c
+PASS: gcc.dg/pr96307.c (test for excess errors)
-UNSUPPORTED: gcc.dg/uninit-pr93100.c
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 16)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 26)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 38)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 48)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 61)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 71)
+PASS: gcc.dg/uninit-pr93100.c (test for excess errors)
-UNSUPPORTED: g++.dg/warn/uninit-pr93100.C -std=gnu++20
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 13)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 20)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 31)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 38)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 49)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 56)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for excess errors)
[Etc.]
-UNSUPPORTED: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20
+PASS: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20 (test for bogus messages, line 17)
+PASS: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20 (test for excess errors)
[Etc.]
-UNSUPPORTED: gnat.dg/asan1.adb
+PASS: gnat.dg/asan1.adb (test for excess errors)
..., while these remain UNSUPPORTED for targets that don't support
'-fsanitize=address'.
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_no_fsanitize_address): Check 'assembly'
instead of 'executable'.