https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99859
Bug ID: 99859 Summary: constexpr evaluation with member function is incorrect Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I'm at a loss for how to describe this. I have an intrusive reference counting smart pointer that manipulates the pointed-to object's `count_` member either explicitly or via a member function. The explicit version works fine, the member function does not (both are fine in clang). See the difference with -DUSE_DEC in https://godbolt.org/z/rhb7e6rjr.