From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D55443858C54; Mon, 5 Feb 2024 09:46:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D55443858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707126403; bh=Jkw/8wcAebNEV/e1tbBy4p0/eCXFjsPuAs+BJMVO6FU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uljJZrttBvMNCO80BLI5O0ds6JRVBrSNoxYkmnE/st7zBPUu4/4h9bfnv7yZdXT+k pAs7jOQUkbTxGbAo7OiPqybhLfAMadgG3j9dYLZRiyeiG9NOTtR04bz/8k/BFgqgRF DA4IH0wUA0DDD9h/UGIBlUvI5Fs4ZCe9C4pGvaVY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113759] [14 regression] ICE when building fdk-aac-2.0.3 since r14-8680 Date: Mon, 05 Feb 2024 09:46:41 +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: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status attachments.created 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=3D113759 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gn= u.org Status|NEW |ASSIGNED --- Comment #6 from Jakub Jelinek --- Created attachment 57321 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57321&action=3Dedit gcc14-pr113759.patch Ugh, already the preexisting handling in convert_*_to_widen is just weird a= nd the new patch inconsistently changed just convert_mult_to_widen and not convert_plusminus_to_widen. In my limited understanding of the code, if actual_precision or from_unsign= edN are different from the properties of typeN, we want to cast, and similarly we want to cast if TREE_TYPE (rhsN) is not uselessly convertible to typeN. For INTEGER_CSTs, such casts should be done using fold_convert always, otherwise build_and_insert_cast.=