https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64136
--- Comment #4 from Eddie C. Dost <ecd at brainaid dot de> --- Andrew, thank you very much, you are correct and I was blind. I now see the problem from gcc's optimizer view and it makes sense to remove the second condition.