From patchwork Mon Mar 6 18:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 65048 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2013362wrd; Mon, 6 Mar 2023 10:50:52 -0800 (PST) X-Google-Smtp-Source: AK7set8SbX/FIVW5KvrfcD5/WNYfdOJuXZ1z4jnEQyT6HlX+odT0XaE4jxuLOPYRF1zlAAGoeP0L X-Received: by 2002:a50:fb85:0:b0:4ab:4d3c:7e99 with SMTP id e5-20020a50fb85000000b004ab4d3c7e99mr11517064edq.2.1678128652411; Mon, 06 Mar 2023 10:50:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128652; cv=none; d=google.com; s=arc-20160816; b=R3caWKiwfbPWcWNQkQOpBuDz6QbLtlYfLCPbltOIwYcsIwLy1xwFyVnZ0kaFTyTPoa ityqkZjFnm7FSpw+7wvgCpen8nGGkWLmSgdMhb6dVX76jsZEThadMlLuo2ZmH7VypldS UCqJC3Se0kRbao3UZxpxuuohjEPqFAQkY1WaO+13GJHCCDLseSilvOgFx9di5w5Ii4eK piSHf1SKOQ+RqhqmQX5cJjFDn9NzMr7rJwLOKjrfWg883ySuGX9ZxcQ7CoR8mfvpDkVt qEqW8b7J+PbWgrPKyZNiDMATv56/4GdN2t1V/VUUKS+x0StYMgNdZwg/pnPQPkZ0WFJ5 E15A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:date:message-id :references:content-transfer-encoding:mime-version:subject :in-reply-to:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=NeRjxsltG/IH9zTx5i9hJqV+N/3Nhpsp6AWAelArqnA=; b=0e3DVdXzY70mPW7StXcFNrCpacbUyNq6meuI2nxnBEdRg19WKDX/1Civ4EKzL0e4HX 8syOQ/eNZb4/GCi6RB2MPU2TqGB1z75JlpSqv/wG/eZvpNAdfSuQsS5h75iuCJ8U+jXx Rw4chepf8AXigoL+IvHTnVVNMEn096BIGH7PB+nC6g3PYAflu+cErsicNUd80N6/ULBX w/IZxq9c5C42jRkw7r49vD1+imY+RrvGXv+UxfjRYZ7rmLBvVTOm99IuCUyfaEoZR+n+ 8tM/jYaGmW9LlZ+sKjGEuKHnN6U1Gb7dDB5jMn83hufZ7v2SQcRuf4hDZpTdgSpKxTwE Ta5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=qeW1VqqB; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d4-20020a1709064c4400b008b17f6b8c9bsi10086419ejw.86.2023.03.06.10.50.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 10:50:52 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=qeW1VqqB; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B4F83858D39 for ; Mon, 6 Mar 2023 18:50:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B4F83858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678128651; bh=NeRjxsltG/IH9zTx5i9hJqV+N/3Nhpsp6AWAelArqnA=; h=To:In-Reply-To:Subject:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qeW1VqqBSfGcYmPIyzAfgGEKWrpcH4aeco6J++M3rNpV1Iq2OuTVW96a+U951N1nG y59u58c/oOAWbKXgI0QL6QQxLgWdnJENEh3EaDqriBbpuUfb+hnK1SbtnLp2R+MTYw zC1yJGHqOEvqHtJdicNULou42eBT8ZgCa0U/03TY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 711A13858D39 for ; Mon, 6 Mar 2023 18:50:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 711A13858D39 To: In-Reply-To: <20230306184542.0517B20405@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Mon, 6 Mar 2023 19:45:42 +0100) Subject: [PATCH 3/3] testsuite: Gate gcc.dg/plugin/must-tail-call-1.c and -2.c on tail_call MIME-Version: 1.0 References: <20230306184542.0517B20405@pchp3.se.axis.com> Message-ID: <20230306185008.538C7203D7@pchp3.se.axis.com> Date: Mon, 6 Mar 2023 19:50:08 +0100 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759645429804763483?= X-GMAIL-MSGID: =?utf-8?q?1759645429804763483?= Borderline obvious when tail_call is available, so I'll then apply. -- >8 -- While gcc.dg/plugin/must-tail-call-2.c passes for all targets even without this, the error message is, for a target like cris-elf that doesn't implement sibling calls: "error: cannot tail-call: machine description does not have a sibcall_epilogue instruction pattern" rather than "error: cannot tail-call: callee returns a structure". Also, it'd be confusing to exclude must-tail-call-1.c but not must-tail-call-2.c * gcc.dg/plugin/must-tail-call-1.c, gcc.dg/plugin/must-tail-call-2.c: Gate on effective target tail_call. --- gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c | 1 + gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c b/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c index 1495a48232a6..3a6d4cceaba7 100644 --- a/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c +++ b/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c @@ -1,3 +1,4 @@ +/* { dg-do compile { target tail_call } } */ /* { dg-options "-fdelayed-branch" { target sparc*-*-* } } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c index c6dfecd32458..d51d15cc0879 100644 --- a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c +++ b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c @@ -1,3 +1,4 @@ +/* { dg-do compile { target tail_call } } */ /* Allow nested functions. */ /* { dg-options "-Wno-pedantic" } */