From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD2B53849ADC; Fri, 19 Apr 2024 22:11:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD2B53849ADC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713564697; bh=HvWZlq+keFkL5iU8hNHFXLLRQEthN8q9J3QLWgWnA4A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CfMQWIWHPGfg1uoS8/ZFoxYnj+69p2Jn4kvuZ4iu+Enef3EMzHka/F6C/X4UZoHab YxQO6+e3Q4CvLu8BGPvB4MZGd7OAXWX4Yo5MkSJ3Bla5Z6tmbTYaas1zBvOkyHIdSU Vip82lpkOIf5OKiMCx0bQAuR2zPcAzo/T6u08tQs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763 Date: Fri, 19 Apr 2024 22:11:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114574 --- Comment #34 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a39983bf58d3097c472252f6989d19b60909dd9a commit r14-10045-ga39983bf58d3097c472252f6989d19b60909dd9a Author: Jakub Jelinek Date: Sat Apr 20 00:05:21 2024 +0200 c: Fix ICE with -g and -std=3Dc23 related to incomplete types [PR114361] We did not update TYPE_CANONICAL for incomplete variants when completing a structure. We now set for flag_isoc23 TYPE_STRUCTURAL_EQUALITY_P for incomplete structure and union types and then update TYPE_CANONICAL later, though update it only for the variants and derived pointer types which can be easily discovered. Other derived types created while the type was still incomplete will remain TYPE_STRUCTURAL_EQUALITY_P. See PR114574 for discussion. 2024-04-20 Martin Uecker Jakub Jelinek PR lto/114574 PR c/114361 gcc/c/ * c-decl.cc (shadow_tag_warned): For flag_isoc23 and code not ENUMERAL_TYPE use SET_TYPE_STRUCTURAL_EQUALITY. (parser_xref_tag): Likewise. (start_struct): For flag_isoc23 use SET_TYPE_STRUCTURAL_EQUALIT= Y. (c_update_type_canonical): New function. (finish_struct): Put NULL as second =3D=3D operand rather than = first. Assert TYPE_STRUCTURAL_EQUALITY_P. Call c_update_type_canonica= l. * c-typeck.cc (composite_type_internal): Use SET_TYPE_STRUCTURAL_EQUALITY. Formatting fix. gcc/testsuite/ * gcc.dg/pr114574-1.c: New test. * gcc.dg/pr114574-2.c: New test. * gcc.dg/pr114361.c: New test. * gcc.dg/c23-tag-incomplete-1.c: New test. * gcc.dg/c23-tag-incomplete-2.c: New test.=