From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1678128609; x=1709664609; h=from:to:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=NeRjxsltG/IH9zTx5i9hJqV+N/3Nhpsp6AWAelArqnA=; b=AQDtFueXCe3IzSVb+C3hZcwzsk+UOcoqB7KgPWFaN3HKhjnM027hECm6 mVVLvrIqOBfLYGTAZn4IFAQuB4l3HIXPTbXtCQPhK7QlCchqIkXh/PEUz CAbktb4rnC2boW47FjoEitqVi+UJhhTROhbkKHyNl5WBLhhviKjVt78N5 zBcj6kpkVDss6kOvcd5+pzTxVgrY/2lLFJb3NdJwNcxOajFcOlvnWUBvU UNcUbUDDvR7A/6tu4MRurF+sPhel4mMxaUCAiySGoGgCd/xI+smV/unKG II3hI8Nl077DRqgfedEm+P+RxYLA4d6R0qBifWTQOY3amg2k18Ap3+WVv A==; From: Hans-Peter Nilsson 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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT 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 List-Id: 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" } */ -- 2.30.2