The infinite loop is still there with gcc-7. I've created bug #876825. Before you exclude armel, you could perhaps try doing something about this warning, which is given not just on armel and may or may not be related to the compiler going into an infinite loop:
energy.c:539:104: warning: iteration 6 invokes undefined behavior [-Waggressive-loop-optimizations] There are other warnings, too, but undefined behaviour is particularly scary.