https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121068

--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm seeing a new libstdc++ testsuite failure since r16-3022-gbc42128330c0ea

FAIL: 20_util/variant/102912.cc  -std=gnu++20 (test for excess errors)
FAIL: 20_util/variant/102912.cc  -std=gnu++23 (test for excess errors)
FAIL: 20_util/variant/102912.cc  -std=gnu++26 (test for excess errors)

The error is:

in 'constexpr' expansion of 'std::destroy_at<const int>(__pointer)'
/home/jwakely/gcc/15/include/c++/15.1.1/bits/stl_construct.h:164:22:   
  164 |       std::destroy_at(__pointer);
      |       ~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/jwakely/gcc/15/include/c++/15.1.1/bits/stl_construct.h:88:9: error:
modifying a const object '* __location' is not allowed in a constant expression
   88 |         __location->~_Tp();
      |         ^~~~~~~~~~
/home/jwakely/gcc/15/include/c++/15.1.1/variant:246:13: note: originally
declared 'const' here
  246 |       _Type _M_storage;
      |             ^~~~~~~~~~

Reply via email to