From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18A883839DF6; Wed, 1 Mar 2023 14:55:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18A883839DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677682518; bh=2J6izqKt3YSMsLRQRRT6Xl11Ltah+Halnb0pq2oJjKQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n5ltFVqn95Mmi4QLZakpFY1t/8vQfY3cY/GXuf9Xi43+B7kG6VWJ4TKPuLbDdszNJ YFs6bB0pC6ttP8kDhrJRXgvJF7gaEplGn7Oy40wlhIpvlZ+sus5gbbLrDDcmN9MumZ m2EbTQD0lkmyhsPEe4LuoS7tI7PT1Yie68TMedFE= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107561] [13 Regression] g++.dg/pr71488.C and [g++.dg/warn/Warray-bounds-16.C -m32] regression due to -Wstringop-overflow problem Date: Wed, 01 Mar 2023 14:55:17 +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: 13.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107561 --- Comment #18 from Jakub Jelinek --- Does the FE really do that? I certainly don't see it in the gimple dump: void X::X (struct X * const this, int k) { *this =3D {CLOBBER}; { this->i =3D k; # USE =3D anything # CLB =3D anything bar (); _1 =3D this->i; _2 =3D k !=3D _1; _3 =3D (int) _2; this->j =3D _3; } } While if I compile the C variant after fixing it up: struct X { int i, j; }; void bar (void); void foo (struct X * restrict this, int k) { this->i =3D k; bar (); this->j =3D this->i !=3D k; } it is there: void foo (struct X * restrict this, int k) { this->i =3D k; bar (); _1 =3D this->i; _2 =3D k !=3D _1; _3 =3D (int) _2; this->j =3D _3; }=