https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122522
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Adding: ``` #pragma GCC novector #pragma GCC unroll(0) ``` Before the loop in main fixes the testcase. So I am thinking this is just at testcase issue where foo is now inlined into main and then we decide that unrolling can help remove the branches due to load from out being optimized out as we store into out due to the inlined foo's.
