From patchwork Tue Jun 4 15:54:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Martin X-Patchwork-Id: 1943462 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=nasilyan.com header.i=@nasilyan.com header.a=rsa-sha256 header.s=xce2voaxvxhmx73p47whqmbxwwvd7qkl header.b=V+bzn66s; dkim=pass (1024-bit key; unprotected) header.d=amazonses.com header.i=@amazonses.com header.a=rsa-sha256 header.s=uku4taia5b5tsbglxyj6zym32efj7xqv header.b=KVPrcmiC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VtwCX2mnsz20WL for ; Wed, 5 Jun 2024 01:55:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A849739A49BE for ; Tue, 4 Jun 2024 15:55:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from a2-56.smtp-out.eu-west-1.amazonses.com (a2-56.smtp-out.eu-west-1.amazonses.com [54.240.2.56]) by sourceware.org (Postfix) with ESMTPS id 3334A398E973 for ; Tue, 4 Jun 2024 15:54:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3334A398E973 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=nasilyan.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eu-west-1.amazonses.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3334A398E973 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.240.2.56 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717516482; cv=none; b=gY3BrN1fpgU8Fgio/DgsoiLDSAGDJVsRhGhCPv4AYaLBcMb9HRFzd8hyNbIFiunpYXnHyu5qu7jxT66PB7OmEYQmMoBAIJjuEhOHD4sslo/2yxaKSIOi23aDTLpPJ86tuAMU54HFSSmPiRIsyiH3LUp+ocR9DgieT2ntgN2T8Vg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717516482; c=relaxed/simple; bh=RESDA0L+XltJM2eKhbN1Ga9v/MAtfYNxRd1TEKVXNKw=; h=DKIM-Signature:DKIM-Signature:Subject:From:To:Date:Mime-Version: Message-ID; b=qWXYm0s55I8v3cUqeUUYqOMRthhtlMrqmmdiNzbooC+M3Tv/t+CVtHmfCGJlzz2WGTxRaTA4DP+fYAFcMiuIuw9px+Z7j0CBiFRTogTdN6LllwCwnAldmZRLrP2C/erg0sPUI9jL6YidEL0snkRGvJfw36fQ78qypwghyjw4A9o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=xce2voaxvxhmx73p47whqmbxwwvd7qkl; d=nasilyan.com; t=1717516479; h=Subject:From:To:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id; bh=RESDA0L+XltJM2eKhbN1Ga9v/MAtfYNxRd1TEKVXNKw=; b=V+bzn66stRwe1exbmthGj0+MY2pQXXc3olrXP5dyWXbKNEhvSL5Fj5aEkjvtWUJl vE/+8lckTLDBYgFR4eM/Vzzd7UB5N3/ljB/hNrPY/nPc8n1aEiWBfESSsdRzYRdXKX1 +L66VNqFzGsO2JImXk6/h//RrfHN+ynTmoJxlyVg= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=uku4taia5b5tsbglxyj6zym32efj7xqv; d=amazonses.com; t=1717516479; h=Subject:From:To:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id:Feedback-ID; bh=RESDA0L+XltJM2eKhbN1Ga9v/MAtfYNxRd1TEKVXNKw=; b=KVPrcmiCEP/H36SSwbUdBwLM25jyuyF/NJCHvqWILq/aoqKydmOO7ETqtiGqe2Se L1XeA1W7V1+qyciSY0cPs669OFbtPKGuWZIM/mFKQCnbLfn5sDNkkACzpt07ynECIiX mlbvr9DP9I+/tgooNX1JThDry1Cw5wjlU0XAcuN4= Subject: [PATCH] PR c++/103338 - Add testcase for issue fixed by recent commit From: =?utf-8?q?Simon_Martin?= To: =?utf-8?q?gcc-patches=40gcc=2Egnu=2Eorg?= Date: Tue, 4 Jun 2024 15:54:39 +0000 Mime-Version: 1.0 References: <20240604155436.1255-1-simon@nasilyan.com> X-Mailer: Amazon WorkMail Thread-Index: AQHatpeBPTwOfM3ERLW+UsnVBaPKhA== Thread-Topic: [PATCH] PR c++/103338 - Add testcase for issue fixed by recent commit X-Original-Mailer: git-send-email 2.44.0 X-Wm-Sent-Timestamp: 1717516479 Message-ID: <0102018fe3f5ad81-79fae8b3-4947-44bf-8e83-4ec3990d1aec-000000@eu-west-1.amazonses.com> Feedback-ID: ::1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2024.06.04-54.240.2.56 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 The case in that PR used to ICE until commit f04dc89. This patch simply adds the case to the testsuite. Successfully tested on x86_64-pc-linux-gnu. PR c++/1033388 gcc/testsuite/ChangeLog: * g++.dg/parse/crash73.C: New test. --- gcc/testsuite/g++.dg/parse/crash73.C | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gcc/testsuite/g++.dg/parse/crash73.C diff --git a/gcc/testsuite/g++.dg/parse/crash73.C b/gcc/testsuite/g++.dg/parse/crash73.C new file mode 100644 index 00000000000..5923b98b719 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash73.C @@ -0,0 +1,19 @@ +// PR c++/1033388 +// { dg-do compile { target c++11 } } + +template +struct zip_view { + struct Iterator; +}; + +template +struct zip_transform_view; + +template +struct zip_view::Iterator { // { dg-error "no class template" } + template + template + friend class zip_transform_view::Iterator; +}; + +zip_view<>::Iterator iter;