From patchwork Tue Oct 15 17:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1997596 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D7rqBgBM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XShLy1lJhz1xvK for ; Wed, 16 Oct 2024 04:44:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 55EFC3858C48 for ; Tue, 15 Oct 2024 17:44:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 9AEA13858D28 for ; Tue, 15 Oct 2024 17:44:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9AEA13858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9AEA13858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729014276; cv=none; b=GTpV4KxOTCDZalHnCLnSuzv8UVrm4DyfKKYA29FKg8CLb6GGC1nnBDUOCmViJ7Ss2LiD5zCBEWyArtzg8Zsv6pRPmhDA1O70o5lJx8BNIFUJ9t3GkpWq6vv5IhsdJyIbnq21tiAR/wXOUnuV7ulVfBubEEtzEL1Ew+nzHPRIE00= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729014276; c=relaxed/simple; bh=W+HZwAIMWUHL6G86fZ/8eDYfPcN4vksFb3UpIj3R0KA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LLfaC0rzxV/h3d4OHaQJHfQmIDjlmwtZOQpAOVf5SgMPDCvqkKDvYCNZ2iDR9MH9Wcwicjz+af9ODFr2NBxwDHqKFLVXnlxGJaxXPfEaQbhtVfCk7CAKnGF7yc2yzoE0t60oRxPhB2jgvgXMseT8/GtVa4ekLhaIDWr+0NTmwVQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729014273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3N/JMrQbpHj9RbN2PSkT8xi/6b3HdoC0v0YurNgSs2Y=; b=D7rqBgBMrAAnKG9NF92FijP9ifz85ryRuyEg3dWfWQ65A6uiEzwSkP5fMpUpmVV4uDEVlJ bqPKbuxe4JFPRzjNrKcI9Th9LyOgE2R4htcVlTV0rRCo/h5E35jn9731CDTQCWwSPo5HMY qVhRs9mU2tcP13HT5Gvi11vuMqHajgE= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-27-9Xu8lEIXOi2ltf3pVEw4Kg-1; Tue, 15 Oct 2024 13:44:32 -0400 X-MC-Unique: 9Xu8lEIXOi2ltf3pVEw4Kg-1 Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-5eb58c0c551so36442eaf.0 for ; Tue, 15 Oct 2024 10:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729014271; x=1729619071; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3N/JMrQbpHj9RbN2PSkT8xi/6b3HdoC0v0YurNgSs2Y=; b=CxzwsAF34zN8/KHL68ydCN/cPiSuBmAsHRa0LwWkZ/4JUzVblRS8wPDuJLcw0PI6kA gQAzsOKIEvpTYUkSXJrCutJ5zP/A8OT5XBMEvHRQGXSQpwaxdSwB61EO0Xrb1A4WV4fA k259PnnMOKqtosVHhdnONvHxBILOnK+ly1luboZzyOtryf5060qGiaPjH3Cp0bfOrNQ7 Zf7t4pGHzhAqzav4ba0pOOxojKSl+lMYW30S4C3ysgpt8LXnGwwf51XmBMNEDg0RlTG9 4W5waX7qnXKEdhm9y23tJSk64rSJd1HaYOU37UNxW7W4zp9JAdf/xYeLSdmKRnY3LJ9p xqGw== X-Gm-Message-State: AOJu0YzB93V3FcfzRITEYRxeyhCPg2dh+JPJdr13KLtiObWI+nEaBAJL 50wbHOTQMGdAXqYZenyGq5oRxzzy7VW9QSzRI1v2ivuKObODJdVyotZWjZWqG38Djm8yCb0wXXp L0W/i3ZHLSrpaOamEDZkWGeL17mlAXzxQx+qr9Yd7PfVanfmPTbF5HE88QRX7Agf6C2mOY5IDdR trp87AT78i41+n6RTHVrHZcL+LXZsUvJ3P0rIR X-Received: by 2002:a05:6870:558d:b0:26c:641a:871c with SMTP id 586e51a60fabf-2886dfbcecbmr2948429fac.9.1729014271096; Tue, 15 Oct 2024 10:44:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNt0YghoLEzi4NG7M60WoSX5/QU3oc/GZL/MM8R9/45s3TC/6M6KE3jXFDdQ6xJg9gBKGb7A== X-Received: by 2002:a05:6870:558d:b0:26c:641a:871c with SMTP id 586e51a60fabf-2886dfbcecbmr2948413fac.9.1729014270701; Tue, 15 Oct 2024 10:44:30 -0700 (PDT) Received: from localhost.localdomain (ool-18bb2a2e.dyn.optonline.net. [24.187.42.46]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b1361646e3sm95370985a.1.2024.10.15.10.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 10:44:30 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, Patrick Palka Subject: [pushed] c++: add fixed testcase [PR80637] Date: Tue, 15 Oct 2024 13:44:28 -0400 Message-ID: <20241015174428.1837788-1-ppalka@redhat.com> X-Mailer: git-send-email 2.47.0.72.gef8ce8f3d4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Fixed by r15-4340-gcacbb4daac3e9a. PR c++/80637 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-fn9.C: New test. --- gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C new file mode 100644 index 00000000000..eb2963afcc9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C @@ -0,0 +1,15 @@ +// PR c++/80637 +// { dg-do compile { target c++20 } } + +template +concept same_as = __is_same(T, U); + +template +struct A { + void f(int) requires same_as; + void f(...) requires (!same_as); +}; + +auto fptr = &A::f; +using type = decltype(fptr); +using type = void (A::*)(int);