From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 468A43857BA3; Wed, 5 Oct 2022 16:07:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 468A43857BA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664986028; bh=InTpn25H7dDWxEYFGxeM72wVdcYrI11jyLsjgWwgbc4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MMa5hZ7gayutfoOAt0dNrS2qzRB0uqPtfyP0JdOo/f/Gv9Dnc28oXcCSkeu0nfqwB PEepOI+skvfbR8DSE3wqB5GNpHfjOWKJXIZWgfNV3uSJXzP/MoPGaSSOjPzuC869c+ UHfZvHTaaUTwMh0GxNPzt1j+sOSQP2Qxqs5wRzww= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107085] __reference_constructs_from_temporary does not detect static up-cast Date: Wed, 05 Oct 2022 16:07:08 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107085 --- Comment #10 from Marek Polacek --- Even more simplified: struct X { virtual void f(); }; struct Z : X {}; constexpr X x =3D X(Z()); I guess we shouldn't try to force_elide X::X(X&&) here because X is a potentially-overlapping subobject.=