From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D3113858D39; Mon, 27 Feb 2023 16:14:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D3113858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677514478; bh=Oyuux6/AP8JDGibUlKlthAfegV1JIkvEXS6uDogg8Cs=; h=From:To:Subject:Date:From; b=etLmP+YUYWk6/3Y7qOE478hPWOYu7BDAvh38IejhL5dOGpDAcvHB3/iqFC8LEZ07V 4qG67X/5+/eJPB0BIRYTXOikqvt+QzDAZQXmJ4YCfQggSisfaxlTKN7lGBqLLlAdH/ DuZjTJZbnZq72APG2IFisnjrEmFTCo1bC5GALrvs= From: "christian.mazakas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108952] New: Regression in uses_allocator_construction_args for pair of rvalue references Date: Mon, 27 Feb 2023 16:14:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: christian.mazakas 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=3D108952 Bug ID: 108952 Summary: Regression in uses_allocator_construction_args for pair of rvalue references Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: christian.mazakas at gmail dot com Target Milestone: --- Consider the following example as demonstrated on Compiler Explorer: https://godbolt.org/z/jhxxK9hT3 The C++20 version of uses_allocator_construction_args seems to inappropriat= ely forward the pair's data members and when they happen to be rvalue reference= s, they decay to an lvalue reference which breaks constructibility tests. This same code will pass for previous standards versions. I'm not sure about the range of compilers affected by this but it seems to follow wherever C++20 support is enabled.=