From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 364703AAB029; Sat, 10 Apr 2021 10:48:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 364703AAB029 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99989] [11 regression] -Wmaybe-uninitialized warning breaks bootstrap on riscv64 Date: Sat, 10 Apr 2021 10:48:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2021 10:48:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99989 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:3e350d8539a4e28ddc30d0f08a4040f10b699135 commit r11-8107-g3e350d8539a4e28ddc30d0f08a4040f10b699135 Author: Jakub Jelinek 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 PR middle-end/99989 * gimple-ssa-warn-alloca.c (alloca_type_and_limit::alloca_type_and_limit): Initialize limi= t to 0 with integer precision unconditionally.=