https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108747
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED Version|og11 (devel/omp/gcc-11) |13.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > and eax, 7 What are you asking about? Why GCC decided to still use %8 here (and do &7) even with the static_cast? The reasoning is because constexpr causes a const integer expression here so the front-end will do the replacement. There is nothing to fix here really because the user asked the compiler to do the casting away the const via const_cast and everything.