From patchwork Wed May 13 13:42:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1289316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=LC8uizMw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MbTF51lBz9sRR for ; Wed, 13 May 2020 23:42:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 40FA6393EC15; Wed, 13 May 2020 13:42:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40FA6393EC15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589377357; bh=17v26roxNze7ag3r3El23bCLfXgzu0tEOg5uUqHIOko=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LC8uizMwPZZhWXbCDeIfFoAuYS5/F3AVqlbMUNuvTcUqXxc6SHtttTPoIvPO3zizK nCRPGjyk4D4mNDsKK75KctkKpEqSSi3av452srBwezTXs0EQ9KI7raDRjlkTD2nvl/ wz5rkieATQu2IxOOpxjl0JRW+5dtHx7Rh4/Ebx70= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id E3B85388A811 for ; Wed, 13 May 2020 13:42:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E3B85388A811 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-BSJwx7aGOvq09mIJJVTb6w-1; Wed, 13 May 2020 09:42:30 -0400 X-MC-Unique: BSJwx7aGOvq09mIJJVTb6w-1 Received: by mail-qv1-f69.google.com with SMTP id fe18so16682321qvb.11 for ; Wed, 13 May 2020 06:42:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=17v26roxNze7ag3r3El23bCLfXgzu0tEOg5uUqHIOko=; b=OUQlU+5FxPkU/qxPu+U7P8Qy34M6e4jGN3mRcBaIAs4wuUHyTnF61f5k32RHk9VnP9 6JugTQrnhGT9mFXu3YfCsfOqlRnulSu9UQsIQZGj66PP76lY3jSDN9qlj5vx4cY/EP6n gz3Ed9JhKJi+QwJTraR0TCeqlwUDcut4IjlGrYhx1uEiVSinW6N8HAqc4w1gn7jmBZhJ LsZ1n7UadEGECuzPPjgV+8Zo/GWVgFlu5KmGBNDoC2J9XAWxACVdhQZG28LBWBl9Ghtt 1oyXvQxsk0MiMogscHYIOZJXJ76OtEMoXJaxEEmBz2RiPkR7SAbisdE5MQla2N2T9TJX Xu9A== X-Gm-Message-State: AOAM530NPFwSXxLuquSmA7lvWO/HWuHVrXhGnkiMMiRYocgcb8m9Zss/ 1ZSkth0yZ+AVHlbt156K4SWUGTQXo9e0bka/3jnjOmPKr+TyP5afbOCAJ5d478QwhA3+4INvSr7 TumD5p7AC1jJKe4TCyg== X-Received: by 2002:a0c:ec49:: with SMTP id n9mr12373258qvq.143.1589377349609; Wed, 13 May 2020 06:42:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy544gkVIL5MpEkjboOaxIRZaMNYym7rCuFdnr1SH3VMUgCqCH7JNv565qqvGucUm/6J70MQA== X-Received: by 2002:a0c:ec49:: with SMTP id n9mr12373184qvq.143.1589377348649; Wed, 13 May 2020 06:42:28 -0700 (PDT) Received: from localhost.localdomain (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id k3sm3070772qkb.112.2020.05.13.06.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 06:42:27 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [committed] c++: Add testcase for already-fixed PR [PR70642] Date: Wed, 13 May 2020 09:42:25 -0400 Message-Id: <20200513134225.585425-1-ppalka@redhat.com> X-Mailer: git-send-email 2.26.2.561.g07d8ea56f2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-19.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_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" We correctly reject the testcase in this PR ever since commit r9-7046. gcc/testsuite/ChangeLog: PR c++/70642 * g++.dg/cpp0x/alias-decl-70.C: New test. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/alias-decl-70.C | 23 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-70.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 22adacb264c..4f602ed6f31 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-05-13 Patrick Palka + + PR c++/70642 + * g++.dg/cpp0x/alias-decl-70.C: New test. + 2020-05-13 Jakub Jelinek PR debug/95080 diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-70.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-70.C new file mode 100644 index 00000000000..28d9279e8a4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-70.C @@ -0,0 +1,23 @@ +// PR c++/70642 +// { dg-do compile { target c++11 } } + +template struct enable_if {}; +template struct enable_if { using type = T; }; + +template +struct foo +{ + template + using meow = typename enable_if::type; // { dg-error "no type named .type." } + + template // 1 + meow bar () = delete; + + int bar () + { + meow i; // 2 + return 0; // 3 + } +}; + +int j = foo().bar();