https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112759
--- Comment #5 from YunQiang Su <syq at gcc dot gnu.org> --- It's my fault. I misunderstanding `reconcat`: if `optr` is NULL, it cannot work as the `s1` at the sametime. If so, the return string will be empty. So, let's define and initial ret like this: char *ret = concat(" "); Any idea?