From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E45AB3858C3A; Tue, 25 Oct 2022 17:51:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E45AB3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666720302; bh=yIGSy7bjMBctJ096HMErPFI300pPOhDPQpoWP/vblak=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W5Ma5fUTOLUEJhx7ztIv3nsNirDBgpF/0G27ovkALiX/Oyk6Nsc3K36seJhL4Wll7 GNrVT35MmQ0MQQxN89D6PWlksY28QFdzBD2AvxVHsKwYBBxjqov1RAMoV34ox12SlC gDK3gr62aif6iZKNN02Dhn4WRNgI9dHNIy8eqnMQ= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/107353] [13 regression] Numerous ICEs after r13-3416-g1d561e1851c466 Date: Tue, 25 Oct 2022 17:51:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov 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: 13.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=3D107353 --- Comment #13 from Alexander Monakov --- As for the Fortran testcases, the issue is again caused by the front-end invoking decl_default_tls_model before assigning DECL_COMMON, this time in fortran/trans-common.cc:build_common_decl. So I guess I can be happy that the assert uncovered issues in three front-e= nds, and adjust the code to avoid downgrading TLS model instead of asserting: diff --git a/gcc/ipa-visibility.cc b/gcc/ipa-visibility.cc index 3ed2b7cf6..bb86005e5 100644 --- a/gcc/ipa-visibility.cc +++ b/gcc/ipa-visibility.cc @@ -886,8 +886,8 @@ function_and_variable_visibility (bool whole_program) && vnode->ref_list.referring.length ()) { enum tls_model new_model =3D decl_default_tls_model (decl); - gcc_checking_assert (new_model >=3D decl_tls_model (decl)); - set_decl_tls_model (decl, new_model); + if (new_model >=3D decl_tls_model (decl)) + set_decl_tls_model (decl, new_model); } } }=