gcc developer says gcc 4.8 does this type of "aggressive optimization" when loop contains undefined behavior, ref:
http://gcc.gnu.org/gcc-4.8/porting_to.html https://lists.fedoraproject.org/pipermail/devel/2013-January/175876.html
i.e. loop may be "optimized" into endless loop.
By the way, I have sent the same patch to the upstream, which was accepted on 2013-06-10.
gcc developer says gcc 4.8 does this type of "aggressive optimization" when loop contains undefined behavior, ref:
http:// gcc.gnu. org/gcc- 4.8/porting_ to.html /lists. fedoraproject. org/pipermail/ devel/2013- January/ 175876. html
https:/
i.e. loop may be "optimized" into endless loop.
By the way, I have sent the same patch to the upstream, which was accepted on 2013-06-10.