https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86524
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org, | |nathan at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: constexpr bool foo (const int *x, const int *y) { if (__builtin_constant_p (x < y)) return x < y; return (__UINTPTR_TYPE__) x < (__UINTPTR_TYPE__) y; } void bar () { constexpr int x = 0; static_assert (!(&x < &x)); static_assert (!foo (&x, &x)); } constexpr void baz () { constexpr int x = 0; static_assert (!(&x < &x)); static_assert (!foo (&x, &x)); }