From patchwork Tue Oct 24 15:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schulze Frielinghaus X-Patchwork-Id: 78469 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C27F53858430 for ; Tue, 24 Oct 2023 15:27:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9812A3858C50 for ; Tue, 24 Oct 2023 15:27:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9812A3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9812A3858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698161229; cv=none; b=KHaPvt7IAUbgEQhCl4FYv4DWp/crrOyLJt6nq2lQstlIB81qSp0SXFzwsn+k+diN99Ggd7oZBhB7AIUWvfRm1o5XOJeADMkEOAkjR8u8rr7gK8SG6NPXuXVHbY1t+GpO3X0kqlhit7ZMreBmucowkypVfU37w/z4vDGf/Lb5WPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698161229; c=relaxed/simple; bh=jNJuJ99UQ8Vq8Ke00S0209AkDbGarx7okDVnj80HCtM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=oHroN+YzEHYbSBfGacE/Kf1Ip8JSYB4KRsfHJJ6fxEh3pezojQ+8SV1UZBZLCUrqDEUMF0FOnZG7iPPuwp/AXC8iKmIYtyeeGqOiS5rLy1R+Q9nBRSDeJB+9e/FqtuUpwdJFwkDE/zDIDAOyytcxBmdBScNN6Qt4zvP6mjjuGbE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39OFBNvZ022982; Tue, 24 Oct 2023 15:27:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=S38qMOdj/ORm9vH+Wz+NR+CWVbIY4RyDvF01mm78Zlg=; b=Ftd4Tv7197Vf6EuloQWrXC8Ex2uJbXL5U5WPBoiA5gw+S1JUUWigBtlNi5IFyxm6Z4Db 25Q18Xtxqzdyt/ceiyzNuCLyQy+mt8/T2ekArFBdn285NHUeHUtwO2OqH6RyJslmoCG6 OiPAF//YuzLQA3e1wx84zLlvYgvtLRP/P7xUbnOmqXpUB6WXurRtTjqr5KtGHF/CyqaX 2DC9PixnezFWRzt7LvLHQW0FjzLuMPRn4TcOtGmOdO4QXr4/U0sthYUJFkHV0ZNuGugr HVpXWsDoiLJvSBykexoE3ABMXOfizBRrzQdWefcxUSaoFMjmlwampR3z8LApFeRCiXgH Kw== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3txg7g917e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 15:27:02 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39OEWTKh004633; Tue, 24 Oct 2023 15:27:01 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3tvtfkg41u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 15:27:01 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39OFQw1p26477308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Oct 2023 15:26:58 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C7E02004D; Tue, 24 Oct 2023 15:26:58 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E2ECB2004B; Tue, 24 Oct 2023 15:26:57 +0000 (GMT) Received: from a8345010.lnxne.boe (unknown [9.152.108.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 24 Oct 2023 15:26:57 +0000 (GMT) From: Stefan Schulze Frielinghaus To: gcc-patches@gcc.gnu.org, iant@golang.org Cc: Stefan Schulze Frielinghaus Subject: [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c Date: Tue, 24 Oct 2023 17:26:55 +0200 Message-ID: <20231024152655.1618696-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: h-QSE-9G-nnOTQ9SKeEOWhZg77Igoniq X-Proofpoint-GUID: h-QSE-9G-nnOTQ9SKeEOWhZg77Igoniq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_16,2023-10-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 suspectscore=0 clxscore=1011 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240133 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Currently _BitInt is only supported on x86_64 which means that for other targets all tests fail with e.g. gcc.misc-tests/godump-1.c:237:1: sorry, unimplemented: '_BitInt(32)' is not supported on this target 237 | _BitInt(32) b32_v; | ^~~~~~~ Instead of requiring _BitInt support for godump-1.c, move _BitInt tests into godump-2.c such that all other tests in godump-1.c are still executed in case of missing _BitInt support. Tested on s390x and x86_64. Ok for mainline? gcc/testsuite/ChangeLog: * gcc.misc-tests/godump-1.c: Move _BitInt tests into godump-2.c. * gcc.misc-tests/godump-2.c: New test. --- gcc/testsuite/gcc.misc-tests/godump-1.c | 12 ------------ gcc/testsuite/gcc.misc-tests/godump-2.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/gcc.misc-tests/godump-2.c diff --git a/gcc/testsuite/gcc.misc-tests/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c index f359a657827..b661d04719c 100644 --- a/gcc/testsuite/gcc.misc-tests/godump-1.c +++ b/gcc/testsuite/gcc.misc-tests/godump-1.c @@ -234,18 +234,6 @@ const char cc_v1; cc_t cc_v2; /* { dg-final { scan-file godump-1.out "(?n)^var _cc_v2 _cc_t$" } } */ -_BitInt(32) b32_v; -/* { dg-final { scan-file godump-1.out "(?n)^var _b32_v int32$" } } */ - -_BitInt(64) b64_v; -/* { dg-final { scan-file godump-1.out "(?n)^var _b64_v int64$" } } */ - -unsigned _BitInt(32) b32u_v; -/* { dg-final { scan-file godump-1.out "(?n)^var _b32u_v uint32$" } } */ - -_BitInt(33) b33_v; -/* { dg-final { scan-file godump-1.out "(?n)^// var _b33_v INVALID-bitint-33$" } } */ - /*** pointer and array types ***/ typedef void *vp_t; /* { dg-final { scan-file godump-1.out "(?n)^type _vp_t \\*byte$" } } */ diff --git a/gcc/testsuite/gcc.misc-tests/godump-2.c b/gcc/testsuite/gcc.misc-tests/godump-2.c new file mode 100644 index 00000000000..ed093c964ac --- /dev/null +++ b/gcc/testsuite/gcc.misc-tests/godump-2.c @@ -0,0 +1,18 @@ +/* { dg-options "-c -fdump-go-spec=godump-2.out" } */ +/* { dg-do compile { target bitint } } */ +/* { dg-skip-if "not supported for target" { ! "alpha*-*-* s390*-*-* i?86-*-* x86_64-*-*" } } */ +/* { dg-skip-if "not supported for target" { ! lp64 } } */ + +_BitInt(32) b32_v; +/* { dg-final { scan-file godump-2.out "(?n)^var _b32_v int32$" } } */ + +_BitInt(64) b64_v; +/* { dg-final { scan-file godump-2.out "(?n)^var _b64_v int64$" } } */ + +unsigned _BitInt(32) b32u_v; +/* { dg-final { scan-file godump-2.out "(?n)^var _b32u_v uint32$" } } */ + +_BitInt(33) b33_v; +/* { dg-final { scan-file godump-2.out "(?n)^// var _b33_v INVALID-bitint-33$" } } */ + +/* { dg-final { remove-build-file "godump-2.out" } } */