https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99859
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Why does it work for: constexpr int foo(int* x) { return ++*x; } struct S { constexpr S() : a(0) { foo(&a); foo(&a); } int a; }; constexpr S s; static_assert (s.a == 2); though? The argument to foo after constexpr processing it is &s.a which is TREE_CONSTANT too, yet we don't cache the calls.