https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #4 from Tomasz KamiĆski <tomaszkam at gmail dot com> --- Oh, you mean that compiler is not allowed to turn comparison of p == b into false at compile time, using 5.10 [expr.eq] p2.1? Some reference from clang: https://llvm.org/bugs/show_bug.cgi?id=13507. Note that I am unable to reproduce problem on clang.