From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EBA023858020; Wed, 10 Mar 2021 21:26:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBA023858020 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99525] wrong location of implicitly generated assignment to polymorphic class Date: Wed, 10 Mar 2021 21:26:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor 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 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: Wed, 10 Mar 2021 21:26:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99525 --- Comment #1 from Martin Sebor --- The (otherwise untested) change below corrects the location: diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 1dcb31c0267..c77745b788d 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4938,7 +4938,7 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id, /* Record the function we are about to inline. */ id->src_fn =3D fn; id->src_cfun =3D DECL_STRUCT_FUNCTION (fn); - id->reset_location =3D DECL_IGNORED_P (fn); + id->reset_location =3D DECL_IGNORED_P (fn) || DECL_ARTIFICIAL (fn); id->call_stmt =3D call_stmt; /* When inlining into an OpenMP SIMD-on-SIMT loop, arrange for new autom= atic=