https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83128
--- Comment #4 from denis.campredon at gmail dot com --- Hi Richard, Thanks for your quick response. I don't know if I should open a new bug or not, but your patch does not seems to handle casts. It fails to optimize the following snippet. ------------ int fn() { char * s = malloc(sizeof(*s)); return ((char*)__builtin_memcpy(s, "a", 1))[0]; } ------------ Regards, Denis