https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109303

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- 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 == IPA_JF_UNKNOWN)
+         if (item->offset < 0
+             || item->jftype == IPA_JF_UNKNOWN
+             || item->offset >= (HOST_WIDE_INT) UINT_MAX * BITS_PER_UNIT)
            continue;
          val_size = tree_to_shwi (TYPE_SIZE (item->type));

fixes the ICE and is then similar to the PR108605 fix.  Dunno if the code can
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.

Reply via email to