From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 666803858C78; Wed, 6 Sep 2023 18:15:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 666803858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694024131; bh=+sFuVJS+BPj1Vx2NIvVnpreFhPYFc+DjS/FnRHTr9jo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rJH5/DFfvaIQEJNE+sm5U5et/Ykz3qe2WAI36sgfFFo4UQBNswCFS3/J7MX3MlkYH UUZ6Oe92zhKKd8NY1YCfvKYepe5aLh4Imb0Vix/a9PgJFr0E1t88MXpTmGCC8HlHdp +nv4ds9HWxR4wiZq08XNOwniuVLb5pistVrxgRUc= From: "rs2740 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111050] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 Date: Wed, 06 Sep 2023 18:15:30 +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.0 X-Bugzilla-Keywords: ABI X-Bugzilla-Severity: normal X-Bugzilla-Who: rs2740 at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fdumont at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D111050 --- Comment #5 from TC --- Minimal example: $ cat lib1.cpp #include #include static std::unordered_set set; void del(const std::string& s) { set.erase(s); } $ cat lib2.cpp #include #include static std::unordered_set set; void add(const std::string& s) { set.emplace(s); } const std::string& get(const std::string& s) { return *set.find(s); } $ cat main.cpp #include void add(const std::string&); void del(const std::string&); const std::string& get(const std::string&); int main() { add("foo"); del("bar"); (void) get("foo").size(); } $ g++-10 -std=3Dc++17 lib1.cpp -c -o lib1.o $ g++-13 -std=3Dc++17 lib2.cpp -c -o lib2.o $ g++-13 -std=3Dc++17 main.cpp lib1.o lib2.o -o test $ ./test Segmentation fault (core dumped)=