https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120065
--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> --- Thanks for the analysis. I think this shows that the testcase I gave above was overly-reduced. I should have mentioned in the initial report that this code came from gcc/testsuite/gcc.c-torture/execute/20060420-1.c, where the loop was originally: for (j = 0; j < n && (((unsigned long) dst + j) & m); ++j) { float t = src[0][j]; for (i = 1; i < a; ++i) t += src[i][j]; dst[j] = t; } which is not trivially useless code, but still ends up with an invalid profile. It should be possible to construct a reduced testcase from the test which shows the problem but isn't a degenerate case.