From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D5EF385781D; Tue, 30 Mar 2021 08:30:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D5EF385781D From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99824] [10 Regression] ICE in wide_int_to_tree_1, at tree.c:1572 Date: Tue, 30 Mar 2021 08:30:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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, 30 Mar 2021 08:30:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99824 --- Comment #6 from Martin Li=C5=A1ka --- > diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c > index 784f131ebb8..94b8b21c7a8 100644 > --- a/gcc/stor-layout.c > +++ b/gcc/stor-layout.c > @@ -2838,6 +2838,8 @@ set_min_and_max_values_for_integral_type (tree type, > if (precision < 1) > return; >=20=20 > + gcc_assert (precision <=3D WIDE_INT_MAX_PRECISION); > + > TYPE_MIN_VALUE (type) > =3D wide_int_to_tree (type, wi::min_value (precision, sgn)); > TYPE_MAX_VALUE (type) >=20 > should uncover any similar issue and eventually allow producing smaller > testcases. Where would you expect the assert to be triggered? In LTO/non-LTO mode?=