https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108085
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The difference between the two front-ends is at the original. The C++ front-end adds a BLOCK around the loop while the C front-end does not. This difference changes where the ASAN_MARK is placed with respect to the return statement.