From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2207A38582A5; Thu, 3 Nov 2022 18:56:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2207A38582A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667501795; bh=FexJZVzWlHz1Pp5zXBUln7S0uyaQaISJlc2NmlWFISI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YzDuQNAPkLuPfjEE0rF7NgO0UdskHA6wY7tTIjYYGLvQPinlX9X1x0YECDCoPguOQ 4fPC6nC3Ch/iQcwX1gH009puGPp7mnjBO4p5qoXmnEuGZrkZg4YjWQXV+Uxy1M6+1+ l7kOL3lSSvJCHX2uhmeyXtpKV1awK8Hf05Yb7euE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/93413] Defaulted constexpr Destructor not being found during constant evaluation Date: Thu, 03 Nov 2022 18:56:33 +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: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka 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=3D93413 --- Comment #10 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:c0b38e9fec71dc4cc5e99b1f0cb159c15a8da9ba commit r13-3638-gc0b38e9fec71dc4cc5e99b1f0cb159c15a8da9ba Author: Patrick Palka Date: Thu Nov 3 14:55:35 2022 -0400 c++: constexpr error with defaulted virtual dtor [PR93413] We're rejecting the below testcase with error: 'virtual constexpr Base::~Base()' used before its definition error: 'virtual constexpr Derived::~Derived()' used before its defini= tion due to special handling in mark_used added by r181272 to defer synthesis of virtual destructors until EOF (where we can set their linkage), which in turn makes them effectively unusable during constexpr evaluation. Fortunately it seems this special handling is unnecessary ever since r208030 enabled us to tentatively set linkage of all defaulted virtual destructors, including templated ones. So this patch gets rid of this special handling. PR c++/93413 gcc/cp/ChangeLog: * decl2.cc (mark_used): Don't defer synthesis of virtual functions. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/constexpr-virtual21.C: New test.=