From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98C71385802A; Tue, 26 Jan 2021 21:12:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98C71385802A From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97474] [8/9/10/11 Regression] produces wrong code with references to another field Date: Tue, 26 Jan 2021 21:12:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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: Tue, 26 Jan 2021 21:12:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97474 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gn= u.org --- Comment #14 from Jason Merrill --- (In reply to rguenther@suse.de from comment #13) Indeed, some useful information is that the parameter is a reference to the most-derived object, not a base class; that should be useful to devirtualization, particularly. Looks like we already have DECL_BY_REFERENCE to indicate this situation, and ipa-polymorphic-call already looks at it, so I'm going to just remove the restrict. DECL_BY_REFERENCE and the restrict were added in the same patch, r0-60100-gd8472c75e8f6cdeabb60e2d743e58fb7ab46fef6, for PR16115.=