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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:3e350d8539a4e28ddc30d0f08a4040f10b699135

commit r11-8107-g3e350d8539a4e28ddc30d0f08a4040f10b699135
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Sat Apr 10 12:48:04 2021 +0200

    gimple-ssa-warn-alloca: Always initialize limit [PR99989]

    This PR is about a -W*uninitialized warning on riscv64.
    alloca_type_and_limit is documented to have limit member only defined
    when type is ALLOCA_BOUND_MAYBE_LARGE or ALLOCA_BOUND_DEFINITELY_LARGE
    and otherwise just default constructs limit, which for wide_int means
    no initialization at all.  IMHO it is fine not to use the limit
    member otherwise, but trying to not initialize it when it can be e.g.
    copied around and then invoke UB doesn't look like a good idea.

    2021-04-10  Jakub Jelinek  <ja...@redhat.com>

            PR middle-end/99989
            * gimple-ssa-warn-alloca.c
            (alloca_type_and_limit::alloca_type_and_limit): Initialize limit to
            0 with integer precision unconditionally.

Reply via email to