From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D05393858430; Tue, 9 Nov 2021 12:21:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D05393858430 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc Date: Tue, 09 Nov 2021 12:21:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tschwinge at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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: Tue, 09 Nov 2021 12:21:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101204 --- Comment #8 from CVS Commits --- The master branch has been updated by Thomas Schwinge : https://gcc.gnu.org/g:c71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb commit r12-5047-gc71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb Author: Thomas Schwinge Date: Tue Nov 9 10:55:15 2021 +0100 Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204, PR103157] Reproduced with clang version 10.0.0-4ubuntu1: gtype-desc.c:11333:1: warning: all paths through this function will call itself [-Winfinite-recursion] ... as well as some GCC's '-O2 -fdump-tree-optimized': void gt_pch_nx(int_hash*, gt_pointer_operator, void*) ([...]) { : : goto ; } That three-arguments 'gt_pch_nx' function as well as two one-argument 'gt_ggc_mx', 'gt_pch_nx' functions now turn empty: [...] void -gt_ggc_mx (int_hash& x_r ATTRIBUTE_UNUSED) +gt_ggc_mx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED) { - int_hash * ATTRIBUTE_UNUSED x =3D &x_r; - gt_ggc_mx (&((*x))); + struct xint_hash_t * ATTRIBUTE_UNUSED x =3D &x_r; } [...] void -gt_pch_nx (int_hash& x_r ATTRIBUTE_UNUSED) +gt_pch_nx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED) { - int_hash * ATTRIBUTE_UNUSED x =3D &x_r; - gt_pch_nx (&((*x))); + struct xint_hash_t * ATTRIBUTE_UNUSED x =3D &x_r; } [...] void -gt_pch_nx (int_hash* x ATTRIBUTE_UNUSED, +gt_pch_nx (struct xint_hash_t* x ATTRIBUTE_UNUSED, ATTRIBUTE_UNUSED gt_pointer_operator op, ATTRIBUTE_UNUSED void *cookie) { - gt_pch_nx (&((*x)), op, cookie); } [...] gcc/ PR middle-end/101204 PR other/103157 * diagnostic-spec.h (typedef xint_hash_t): Turn into... (struct xint_hash_t): ... this. * doc/gty.texi: Update.=