https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83311
Bug ID: 83311 Summary: Unable to optimize alloc calls with casts and string builtins Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: denis.campredon at gmail dot com Target Milestone: --- Hello, The fix for #pr83128 does not optimize the following testcase which should produce the same result ---------------- int fn() { // same with malloc or calloc char * s = __builtin_alloca(sizeof(*s)); return ((char*)__builtin_memcpy(s, "a", 1))[0]; } ------------- Regards, Denis