https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120979
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > Note xstrdup is not the same as strdup ... > > ``` > char *a() > { > return __builtin_strdump ("aaaa"); Sorry typo, __builtin_strdup. > } > ``` > > Would need to be changed into: > ``` > char *a() > { > const char tt[] = "aaaa"; > char *t = __builtin_malloc(sizeof(tt)); > if (t) __builtin_memcpy(t,tt, sizeof(tt)); > return t; > } > ``` > > I am not 100% sure if it is worth it either.