https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114367
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-03-16
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Hmm:
>
> _Bit_pointer __p = _Bit_alloc_traits::allocate(_M_impl,
> _S_nword(__n));
> #if __cpp_lib_is_constant_evaluated
> if (std::is_constant_evaluated())
> {
> __n = _S_nword(__n);
> for (size_t __i = 0; __i < __n; ++__i)
> __p[__i] = 0ul;
> }
> #endif
>
> Maybe I misunderstand how this should work.
Oh yes see https://github.com/llvm/llvm-project/issues/46391
So yes this is a GCC bug with the above.