https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120846
--- Comment #6 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> --- One alternative preventing from counts being mixed up between functions is to make the pattern include the linenumber of the loop in which the pattern is detected. Although that makes the tests a bit more fragile, as the tests would need to be adjusted whenever the line number changes for any reason.