https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98920
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed.
But perhaps instead of adding new effective target tests, in this case it could
be resolved by:
--- gcc/testsuite/c-c++-common/asan/pr98920.c.jj 2021-03-08
23:40:33.935447429 +0100
+++ gcc/testsuite/c-c++-common/asan/pr98920.c 2021-03-09 12:15:28.904809967
+0100
@@ -3,10 +3,13 @@
#include <stdio.h>
#include <sys/types.h>
+#if __has_include(<regex.h>)
#include <regex.h>
+#endif
int main(void)
{
+#ifdef REG_STARTEND
regex_t r;
const char s[] = "ban\0ana";
regmatch_t pmatch[10];
@@ -20,5 +23,6 @@ int main(void)
return 3;
}
regfree(&r);
+#endif
return 0;
}