From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5B9973857354; Mon, 21 Aug 2023 16:30:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B9973857354 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692635456; bh=LzjZzLSxZw7/yJ/RrbxaXYNJDGf3PGW+Vqiipar2Tj8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IJmB+Ne6QmIlGuWajFjYp1cs4R5TofyZvOuWjFJRiY1FAQ42XwtyIw68dUQqMU7NV bwxtYD3qVLQ9nJ6wi42b1dsWrwISppx8BftKQlon2ZNCGtdOvkfn9rIib6oLc4t/39 nEUveQKAg555lLvhdpBbsU2KZvGxn8U0l4BdnD2Y= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111090] Bogus -Wuninitialized for trivial copy of nested struct with partially initialized array Date: Mon, 21 Aug 2023 16:30:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- 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=3D111090 --- Comment #3 from Andrew Pinski --- Reduced to make it obvious what is going on: ``` struct A { A() { buf[0] =3D 0; } int buf[2]; }; A g() { A a; A b =3D a; return b; } ```=