https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81811
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > Wonder whether the memcpy case is because we fold the memcpy away as both > memcpy and strcpy are marked RET1 (returns arg1). The memcpy is eliminated in DSE and turned into a plain 'return a' statement that the find_explicit_erroneous_behavior() in tree-ssa-isolate-paths.c that implements the warning knows how to handle. DSE doesn't handle strcpy or strncpy so the calls are not eliminated and because find_explicit_erroneous_behavior() doesn't handle calls, the 'return strcpy(a, s)' statement isn't detected. This suggests an opportunity to improve not just the warning but also DSE.