From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 856DC385842B; Wed, 29 Mar 2023 16:40:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 856DC385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680108037; bh=Sngfg6d9gEQwZp5IbtbP/qlh16ZFF8OUc7Q0GkLIz5U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w8i99CewGHOhNTNkGpvMcDYs/ywu26Ou09v9HEDxHyWFRV166uf7Q9GQGy7Zw9iIE /zZvupGvqWWbTX115NWamQlrL2pBuqFzCD3MBJj6OYwl9rCp+gxscVX2rKBZ1LwV8Y VnzFMt1DdnOVat0+DVZyJJX24vYu0YzODsHeyk8g= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109303] [13 Regression] ICE in push_agg_values_from_plats, at ipa-cp.cc:1458 since r13-3358-ge0403e95689af7d5 Date: Wed, 29 Mar 2023 16:40:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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=3D109303 --- Comment #4 from Jakub Jelinek --- --- gcc/ipa-cp.cc.jj 2023-03-14 19:12:19.949553036 +0100 +++ gcc/ipa-cp.cc 2023-03-29 18:32:34.148888423 +0200 @@ -3117,7 +3117,9 @@ propagate_aggs_across_jump_function (str { HOST_WIDE_INT val_size; - if (item->offset < 0 || item->jftype =3D=3D IPA_JF_UNKNOWN) + if (item->offset < 0 + || item->jftype =3D=3D IPA_JF_UNKNOWN + || item->offset >=3D (HOST_WIDE_INT) UINT_MAX * BITS_PER_UNIT) continue; val_size =3D tree_to_shwi (TYPE_SIZE (item->type)); fixes the ICE and is then similar to the PR108605 fix. Dunno if the code c= an overflow also offset + size computations or something protects against that. Anyway, I think it would be worth it to switch all those unsigned int byte offsets to unsigned HOST_WIDE_INTs for GCC 14.=