From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2EDF83858D33; Tue, 27 Jun 2023 18:48:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EDF83858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687891705; bh=yQppYOxIl/lOltW52rVdJgpCI1+GTcpHPhUmEa6ShLY=; h=From:To:Subject:Date:From; b=bj3zUHcjYoCt3zfsrLmPMvbixCsxd/NBvn7p06yEZiXKKjUm4FApnJptGZJMXOOTv mR3OckIyVuUwGab/Qd0obuJZBUjkqLeLVSoHIL8QTInRddQgPFc7Lnu9yLQzmOYd7T G1JWk9Um6r4AAJYnXr415m52Xw28sbx64dB2O8+Q= From: "eric.niebler at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110441] New: c++17 deferred materialization of temporaries fails when calling class static with member syntax Date: Tue, 27 Jun 2023 18:48:24 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eric.niebler 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=3D110441 Bug ID: 110441 Summary: c++17 deferred materialization of temporaries fails when calling class static with member syntax Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com Target Milestone: --- struct immovable { immovable() =3D default; immovable(immovable &&) =3D delete; }; struct S { static immovable f() { return {}; } }; immovable g() {=20 return S().f(); } compile with -std=3Dc++17. Result: : In function 'immovable g()': :14:15: error: use of deleted function 'immovable::immovable(immovable&&)' 14 | return S().f(); | ~~~~~^~ :4:3: note: declared here 4 | immovable(immovable &&) =3D delete; | ^~~~~~~~~ https://godbolt.org/z/Y1h9bPrf3=