From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 05D853858D32; Sat, 11 Feb 2023 05:49:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05D853858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676094541; bh=glDe6WlrLdDCujX1TXZz6bB0YjnGv3ceDkYIdQjDF3M=; h=From:To:Subject:Date:From; b=kLRBIKDuCJEciJMGa6Nk7JdmAleO+gW7WKRXMspldTlYgTVMZXB89INRKWwqz4Ord stf83aCV+qZkU51NI2qnLO9Ci5QvPvrnWz9QR1kM3OsVZRdadgWK+OpfZhMojwyTtY 36uC+FWqxDDAy8DEMaJ3nHRIlhRXI7MRzHXNLCWI= From: "herring at lanl dot gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108759] New: "mandatory copy elision" not implemented during constant evaluation redux Date: Sat, 11 Feb 2023 05:49:00 +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: herring at lanl dot gov 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=3D108759 Bug ID: 108759 Summary: "mandatory copy elision" not implemented during constant evaluation redux Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Extending the test case in (the invalid) #94537 to have a user-provided destructor does not cause the "mandatory copy elision" to take place even though the implementation is no longer permitted to introduce a temporary: struct A; extern const A a; struct A { bool special=3Dthis=3D=3D&a; constexpr ~A() {} }; constexpr A get() {return {};} // or "return A();" constexpr A a=3Dget(); static_assert(a.special);=