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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Koenig <tkoe...@gcc.gnu.org>:

https://gcc.gnu.org/g:b57e6e1b38cdaf7a982474d93ebede1cc30f1d46

commit r15-7586-gb57e6e1b38cdaf7a982474d93ebede1cc30f1d46
Author: Thomas Koenig <tkoe...@gcc.gnu.org>
Date:   Sun Feb 16 12:15:40 2025 +0100

    Avoid shift wider than unsigned HOST_WIDE_INT on unsigned integer
exponentiation.

    this patch is a variation of Jakub's patch in the PR, which
    avoids overflow on the mask used for exponentiation and
    fixes unsigned HOST_WIDE_INT.  I tried testing this on
    a POWER machine, but --with-build-config=bootstrap-ubsan
    fails bootstrap there.

    gcc/fortran/ChangeLog:

            PR fortran/118862
            * trans-expr.cc (gfc_conv_cst_int_power): Use functions for
            unsigned wide integer.
            (gfc_conv_cst_uint_power): Avoid generating the mask if it would
            overflow an unsigned HOST_WIDE_INT.  Format fixes.

Reply via email to