http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54136
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-31 09:24:56 UTC --- (In reply to comment #4) > Ok thanks will adjust the test case. > > So compiler can generate infinite loop incase of array out of bound acess? Yes, anything can happen when you invoke undefined behavior like this.