From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82A593858D20; Sat, 16 Mar 2024 22:13:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82A593858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710627181; bh=hjUetL8+GsaAQVobGOqWrr/mIaROOrnNIFSCI1g49Mg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ypHk1CzDwhvSoq+4cudGvFmjZo7WgZ02ZdMcDdbsXDlZoYNWjWHqMiv1bZ4DPYImz Nfhb50QWD8oCJdVz2V8zrxE+92Plkt9frHy4ywb/rngjiCd52R0lcWopI8gI3BVgPL GwdO5tR/EQ358Veagc5AuzIMNgolNvkuJ2kuAYY0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114367] std::vector constexpr initialization doesn't start lifetime of array members Date: Sat, 16 Mar 2024 22:13:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114367 --- Comment #1 from Andrew Pinski --- Hmm: _Bit_pointer __p =3D _Bit_alloc_traits::allocate(_M_impl, _S_nword(= __n)); #if __cpp_lib_is_constant_evaluated if (std::is_constant_evaluated()) { __n =3D _S_nword(__n); for (size_t __i =3D 0; __i < __n; ++__i) __p[__i] =3D 0ul; } #endif Maybe I misunderstand how this should work.=