With the patch applied, I've been able to compile the test case using
the resulting native compiler, and a native build of NetBSD hasn't
failed yet, which is promising. I have not applied any workarounds to
sancov.c or to tree-switch-conversion.c, and I'm also compiling GCC with
the default optimisation level (-O2; I haven't applied any of Matthew's
changes mentioned earlier).
I've also applied this change to a copy of GCC 10.5.0 from upstream and
on amd64 at least there was no change to the regression test results so
I don't think this introduces any regressions.
I'm curious to know if this will work for anyone else.