From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9E4303889C32; Mon, 19 Jul 2021 11:47:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E4303889C32 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100863] 23_containers/unordered_{map,set}/allocator/default_init.cc still fail at runtime even after r12-1153 Date: Mon, 19 Jul 2021 11:47:09 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution assigned_to bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2021 11:47:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100863 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu= .org Status|RESOLVED |REOPENED --- Comment #6 from Jonathan Wakely --- My fix causes a regression: #include template struct Allocator { using value_type =3D Tp; Allocator(int) noexcept { } template Allocator(const Allocator&) { } Tp *allocate(std::size_t n) { return std::allocator().allocate(n); } void deallocate(Tp *p, std::size_t n) { std::allocator().deallocate(p, n); } }; using Set =3D std::unordered_set, std::equal_to, Allocator>; static_assert( ! std::is_default_constructible::value, "" ); The standard doesn't require the trait to be true, but it was (because we defined the default constructors as defaulted all the way down to the EBO helper). With the change above, the EBO helper for an empty class does: _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { } which is ill-formed now, not implicitly deleted. I have a patch to make it use [[no_unique_address]], so we can default it again.=