Hi. Sorry that it took me quite some time. The patch puts sancov pass before switch lowering on -O0.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. The test-case now works on aarch64. Ready to be installed? Martin gcc/ChangeLog: 2018-02-16 Martin Liska <mli...@suse.cz> PR sanitizer/82183 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0. --- gcc/passes.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/passes.def b/gcc/passes.def index 9802f08ecfc..3ebcfc30349 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -397,8 +397,8 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_lower_vaarg); NEXT_PASS (pass_lower_vector); NEXT_PASS (pass_lower_complex_O0); - NEXT_PASS (pass_lower_switch); NEXT_PASS (pass_sancov_O0); + NEXT_PASS (pass_lower_switch); NEXT_PASS (pass_asan_O0); NEXT_PASS (pass_tsan_O0); NEXT_PASS (pass_sanopt);