From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 09C243865C22; Fri, 15 Dec 2023 13:33:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09C243865C22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702647238; bh=UmfTP6eeYzCdKm9doPgB8VOK7DnkcmwB8aQJxPFK+0g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hnLYvaE0aPEqVVHlTOsCdSYnDcT+M75jNahtgxhEf8dUEZsCK4MrEPbVLcRk1Ohq5 b+OniWyE3WCSZvFbopJJzYMSGNkmX3g9KRjwONfEqtYRU9dC3RUza3NqTIb1WHhVNb e+2ZNO9d+lk5bh+6yMM2iAGJWVSgRHvBl2dVlxXs= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99919] [11/12/13/14 Regression] bogus -Wmaybe-uninitialized with a _Bool bit-field Date: Fri, 15 Dec 2023 13:33: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: 11.0 X-Bugzilla-Keywords: deferred, diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on cc 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=3D99919 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2021-11-30 00:00:00 |2023-12-15 CC| |jamborm at gcc dot gnu.org --- Comment #10 from Richard Biener --- This is also a missed SRA optimization. SRA produces b$i_16 =3D b.i; b$j_17 =3D b.j; b.i =3D b$i_16; b.j =3D b$j_17; _1 =3D VIEW_CONVERT_EXPR(b); _2 =3D _1 & 1; ... b.i =3D b$i_16; b.j =3D b$j_15; _4 =3D VIEW_CONVERT_EXPR(b); _5 =3D _4 & 2; which is sub-optimal - for some reason it chooses to create replacements for i and j instead of a unsigned char replacement for the whole aggregate driven by the V_C_E access access { base =3D (2771)'b', offset =3D 0, size =3D 8, expr =3D b, type =3D= struct B, reverse =3D 0, grp_read =3D 1, grp_write =3D 0, grp_assignment_read =3D 1, grp_assignment_write =3D 0, grp_scalar_read =3D 0, grp_scalar_write =3D 0, grp_total_scalarization =3D 0, grp_hint =3D 0, grp_covered =3D 0, grp_unscalarizable_region =3D 0, grp_unscalarized_data =3D 1, grp_same_acce= ss_path =3D 1, grp_partial_lhs =3D 0, grp_to_be_replaced =3D 0, grp_to_be_debug_rep= laced =3D 0} is also odd because the access type is really 'unsigned char'? That seems to be because /* We need to dive through V_C_Es in order to get the size of its paramet= er and not the result type. Ada produces such statements. We are also capable of handling the topmost V_C_E but not any of those buried in o= ther handled components. */ if (TREE_CODE (expr) =3D=3D VIEW_CONVERT_EXPR) expr =3D TREE_OPERAND (expr, 0); but I couldn't easily convince it to do sth here (and dumps turn out empty as for reasoning of disqualification).=