From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 807B43858D35; Mon, 20 Apr 2020 16:57:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 807B43858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587401837; bh=W8j9iwesvZ3KObH/xon1B/FKRmCsMpSLWcvMSkrvx78=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qLQqEfYdNcoev8ED3lyQqN3H2ZzVp19k8d85LBfgDUOznWc2oVuUKGf0NqB+mb/kE rXuH7wWYR9UO/1qfGy9W3ZSuFrQf5QcCYZACzflj9HX633FRdD7zu6nRXHAmAriW2/ Csmy5EylZa0vFyiLYNINmqDuEiWkJJrLYLgLtMME= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a Date: Mon, 20 Apr 2020 16:57: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: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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: Mon, 20 Apr 2020 16:57:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94655 --- Comment #5 from Martin Sebor --- We want stores by user code to be diagnosed based on strict language rules (e.g., accessing a member via a reference to another member). To do that we either have to teach the middle end to avoid taking shortcuts that make the= IL look like invalid user code, or be able to apply more permissive rules for stores synthesized by it. I assume the former is what you meant by "modify the &something.field into &MEM_REF[..., off]." My comment was in support of that because, provided t= he latter part actually meant "&MEM_REF[something, offsetoff (typeof (somethin= g), field)], it could be added to and subtracted from to obtain pointers to any other member of "something." (In contrast, &something.field + N is only va= lid for N <=3D sizeof something.field (flexible arrays aside)).=