From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 413E83858CDB; Thu, 4 Apr 2024 06:14:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 413E83858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712211282; bh=RHblRgu78/3XoS8eK+BZ7jOZyDdvT0uGJ02M1OWwRkM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MigVmt141VbO4I2ICeqehgJxgyNjl8ppDx+uPVSJcxBD8jV+VsFu9g1/1UhjgmNet A5aEHqRadj7brl0vqZdVfaGKiiSobuEuHrEoAS8520y4ruHy85L8ap5l2XnH9NYWPq 8FSSFuz3bcsM6CsD3j5cfnIs4gdx5rU4WPG0gf74= From: "uecker 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: Thu, 04 Apr 2024 06:14:41 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: uecker at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 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 #8 from uecker at gcc dot gnu.org --- If we do not care too much about TYPE_CANONICAL being correct in this case anyway, we could turn off the test and add a condition flag_isoc23 as a precaution in the FE to not risk any other regressions for pre C23. Otherw= ise we could revert the fix to PR114361 but this also does not seem ideal. diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index f2083b9d96f..efdbe1a3bde 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -9722,7 +9722,8 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes, C_TYPE_VARIABLE_SIZE (x) =3D C_TYPE_VARIABLE_SIZE (t); C_TYPE_VARIABLY_MODIFIED (x) =3D C_TYPE_VARIABLY_MODIFIED (t); C_TYPE_INCOMPLETE_VARS (x) =3D NULL_TREE; - TYPE_CANONICAL (x) =3D TYPE_CANONICAL (t); + if (flag_isoc23) + TYPE_CANONICAL (x) =3D TYPE_CANONICAL (t); } /* Update type location to the one of the definition, instead of e.g. diff --git a/gcc/ipa-free-lang-data.cc b/gcc/ipa-free-lang-data.cc index 16ed55e2e5a..0b75f05fab3 100644 --- a/gcc/ipa-free-lang-data.cc +++ b/gcc/ipa-free-lang-data.cc @@ -254,8 +254,11 @@ fld_incomplete_type_of (tree t, class free_lang_data_d *fld) else first =3D build_reference_type_for_mode (t2, TYPE_MODE (t), TYPE_REF_CAN_ALIAS_ALL (= t)); + // FIXME: temporarily decativated because of PR114493 +#if 0 gcc_assert (TYPE_CANONICAL (t2) !=3D t2 && TYPE_CANONICAL (t2) =3D=3D TYPE_CANONICAL (TREE_TY= PE (t))); +#endif if (!fld->pset.add (first)) add_tree_to_fld_list (first, fld); return fld_type_variant (first, t, fld);=