https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97858
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That said, can't reproduce with simplified:
void
foo (char *str, char *tail, ...)
{
__builtin_va_list ap;
if (tail)
__builtin_va_start (ap, tail);
for (int first = 1; str; first = 0)
{
*str = ' ';
if (first)
str = tail;
else
str = __builtin_va_arg (ap, char *);
}
if (tail)
__builtin_va_end (ap);
}
