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: 157592 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2021231vqx; Tue, 24 Oct 2023 08:27:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWtGInD8hHzT5A/RmJLGLRd03II4NhTQVlxh9j9Zpbpccp0tMW5LR9SXmuJgw0W9WbgMsg X-Received: by 2002:a05:6214:4009:b0:66d:42d9:fc83 with SMTP id kd9-20020a056214400900b0066d42d9fc83mr12636148qvb.10.1698161253795; Tue, 24 Oct 2023 08:27:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698161253; cv=pass; d=google.com; s=arc-20160816; b=UeWEENz5NJzD7GdK8ggAFgvdUkzzb0R1QWTXRHPUHz6ibteE2fevGJmP3YiFF+eE3H ENqLLzM9yga8UYd2MvbUEbXJRLnMt6frsEv6bEv50xj5iYShKxrTh2Qyj1/UBuaoq1qQ jTyMmgZFGwoI7ftvWxQUL4A8z7L9ZcXeP6MwVJLs2n9QGb4ocXf9FAZoH+R1IXlFEWU8 D3y3ZEu7//gVmwyH96O9GBrw7Ln9nX0tkF9R6j5cznidgwxTo6YNH7z5FcfolSjdH/xH UhlYbKYm6xCZdvy5hVWXA+UcoA6NgXk5jr9Q3p+U2sjOROzAVEmcqC63rrNwjIVd1hZo MBvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=S38qMOdj/ORm9vH+Wz+NR+CWVbIY4RyDvF01mm78Zlg=; fh=p8k3rfTwxeKhz3OJGUZd4aoviLBFAN/x3eIxsrKAEpo=; b=VrZ6dKaDWaPJeCzlMulcO98GgE5TBQ5eB4uVhpztN5GJd5nkN+m4Ww6xa8xvN6RatR 80zTNT2FqMO+w09qbeFd4IrrgIDVBjVpE/qBbNxmj2BS9Sp2W2OBZ3Zsjo3mWdVdCTDZ X9BHhFFgF67THxhQ3Tg/8YBWsNfHuB5e3bWth5klOneiW+Q+SjATrIRg02hSXW/L1+J5 TJZzgTKBKXRlp8lbO+rfPNFyJ/dDQi+13IpyRB1rukl7Yu+HeBIXvHiPhtXuFuftSd56 wSyiCw1X0i+Ko2gySCT1K7rts8xSzgXg8rZhmIhhIiyf5wT4NBzUylLklYKnV/eMXH7E UIpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Ftd4Tv71; arc=pass (i=1); 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x7-20020ad44587000000b0066d0f75bd25si7354442qvu.614.2023.10.24.08.27.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:27:33 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b=Ftd4Tv71; arc=pass (i=1); 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3F9553857C41 for ; Tue, 24 Oct 2023 15:27:33 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780651134654837361 X-GMAIL-MSGID: 1780651134654837361 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" } } */