https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79681
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- A problem with that information loss due to make_bit_field_ref and its callers during folding is that there could e.g. be multiple fields that fall into the range (e.g. inside of union) etc. The IMHO best fix would be to stop doing constexpr evaluation on folded functions (i.e. copy constexpr function bodies before folding), or perhaps we could change make_bit_field_ref so that it attempts to use as many COMPONENT_REFs/ARRAY_REFs from orig_inner as possible, maybe just see if orig_inner is a bit field with DECL_BIT_FIELD_REPRESENTATIVE and if the bitpos + bitsize could be used for that.