http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59590
--- Comment #2 from Allin Cottrell <cottrell at wfu dot edu> --- OK, you're right, there's an off-by-one bug in the second k-loop. But it's not very nice that gcc takes that as a license to produce an infinite loop. However, I guess that makes this report a duplicate of some others that have made the same observation.