https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71690
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #1) > See also C++ bug 71654 for the "inverse" of the problem where VRP > successfully provides range information in the absence of a conversion but > fails with it. That is a totally different issue. The issue here is that range information has to be correct for all places where the name is used. Without a cast the name is used in both the comparison and in the memcpy so the range needs to be empty so the comparison is not removed.