From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C11303986003; Thu, 3 Sep 2020 19:54:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C11303986003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599162868; bh=3Fl1Yf0AhLAYTNRUAl3HqldLaQvC2LMNAZfXFxjDXlM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=k6+ARCKj6t/Emc3/FT0WXAPFTIQZ2yfZMmq68HyP1toCeyKbQSuvcUIRQ3s7KJ+vb GUIErY1/wXdnfhXr+MnGzdwD+BafokN//XZe400smn5r7Y/YWrATPPUmH88CpN2UoX CmN0h+100OyWL2oOwBfnXpJ5ervIcL0j7XrsAlyg= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96901] [11 Regression] Many libstdc++ tests FAIL on i686-linux due to a PCH FE bug Date: Thu, 03 Sep 2020 19:54:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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 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: Thu, 03 Sep 2020 19:54:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96901 --- Comment #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ba6730bd18371a3dff1e37d2c2ee27233285b597 commit r11-3001-gba6730bd18371a3dff1e37d2c2ee27233285b597 Author: Jakub Jelinek Date: Thu Sep 3 21:53:40 2020 +0200 c++: Fix another PCH hash_map issue [PR96901] The recent libstdc++ changes caused lots of libstdc++-v3 tests FAILs on i686-linux, all of them in the same spot during constexpr evaluation of a recursive _S_gcd call. The problem is yet another hash_map that used the default hasing of tree keys through pointer hashing which is preserved across PCH write/r= ead. During PCH handling, the addresses of GC objects are changed, which mea= ns that the hash values of the keys in such hash tables change without tho= se hash tables being rehashed. Which in the fundef_copies_table case usua= lly means we just don't find a copy of a FUNCTION_DECL body for recursive u= ses and start from scratch. But when the hash table keeps growing, the "de= ad" elements in the hash table can sometimes reappear and break things. In particular what I saw under the debugger is when the fundef_copies_t= able hash map has been used on the outer _S_gcd call, it didn't find an entry for it, so returned a slot with *slot =3D=3D NULL, which is treated as that= the function itself is used directly (i.e. no recursion), but that addition= of a hash table slot caused the recursive _S_gcd call to actually find something in the hash table, unfortunately not the new *slot =3D=3D NUL= L spot, but a different one from the pre-PCH streaming which contained the retu= rned toplevel (non-recursive) call entry for it, which means that for the recursive _S_gcd call we actually used the same trees as for the outer = ones rather than a copy of those, which breaks constexpr evaluation. 2020-09-03 Jakub Jelinek PR c++/96901 * tree.h (struct decl_tree_traits): New type. (decl_tree_map): New typedef. * constexpr.c (fundef_copies_table): Change type from hash_map * to decl_tree_map *.=