https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81629
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|ASSIGNED |NEW Component|middle-end |c Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Oh. The real issue is that the FE registers the function with the bogus prototype as builtin. So gimple_builtin_call_types_compatible_p sees the call matches the prototype. That this is BUILT_IN_MEMCPY is simply a lie by the FE. Still invalid input. We also do not even warn about the bogus prototype given.