From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0065E3858D37; Wed, 1 Feb 2023 10:09:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0065E3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675246176; bh=oD+YFcLZJHGwcvYQPWULipkbiWTrD959bO/LRRmklL4=; h=From:To:Subject:Date:From; b=h2aEF9JUevCpJljEabkuqG8xjsqG6m+bzpjhmWHeUQWurdxHll/PoFLf9nkV/DryR ydVXRuRspoz8RBorTet0awqhVBMZDjmqiFT9P/5niBy3OjVs2UinSmkEfVJTzWN4O4 TM/Urc12ww00MslDFJ6w+9bax/WWbtnrl41f9x3g= From: "zakkariusr at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108627] New: A new crash with using a simple class, inheritance and a function (version 2) Date: Wed, 01 Feb 2023 10:09:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zakkariusr at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108627 Bug ID: 108627 Summary: A new crash with using a simple class, inheritance and a function (version 2) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zakkariusr at gmail dot com Target Milestone: --- The following code: struct A { int i =3D 0; A() {} A(const A&) { i =3D 1; } int g() { return i; } }; struct B : A {}; A u() { return A{}; } int main() { return B{u()}.g(); } causes a compiler crash on the current gcc(trunk) 13.0.1 I already reported the same thing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108559 but applied a shorter version there for simplicity - that one was fixed but this one here still crashes. Getting a member field (i) works now in this c= ase but not the member function (g()) Be ready for the version 3 :)=