From patchwork Sun Jul 2 23:23:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 115161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp186885vqx; Sun, 2 Jul 2023 16:24:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6U1HbsJysVvATqRdnJwjv73GdTSfr3iqaNAz0tpB6atvcDWIm/jn17EVt8pnaBXcEmXRsD X-Received: by 2002:a17:907:720c:b0:988:565f:bf46 with SMTP id dr12-20020a170907720c00b00988565fbf46mr9166305ejc.32.1688340271641; Sun, 02 Jul 2023 16:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688340271; cv=none; d=google.com; s=arc-20160816; b=JvDww/PJrPlamJ7Gd8lCnvjmOKp3Xh/0tgWY0TcrtVlMSLatjpPCEG0lrovgrmXgBr c81297TTaqXMaSMXVtfzTHBQHqh00tMz7wFVN3N7pMapGpnoCGPntTQ0NV9DdArY5Imj 1gw0rIHLENsHwXkmVuujZPlt+h/pTFtt9zihiJjwIvaEdtk/rQgglU/WHIxCZ8M3+WWG QzV8ikrheujcskefHtoeml2BPefL6ex2OGxJ/Ni40Jetpc6xbIhDFmP3TPMN9uKBMiIH Ucg/cf5ZxZsm7cbOeo34ThfScFqLol89okX15A/mqLMZEAXXmEfmFACssFz3tJTjUyvj TNRw== 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 :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=TCdfmChNeqGYguLpQs3MjxeYSWZkVWCX38zz2TaSeDA=; fh=D2tRalIjW6KCgVuqwFHStdMb9uqe8HSQc2WEvRJ6uLE=; b=1LZLqyHL04VEx0aWcLDEQ+hbP6hV0/GcLPORJDNUWrTkEugvVjwxDw8rCNZgkIBUUU DxooT9+DCC/g3ZvhbVGKIbcUbepkatxpA2BjFPGlM9oTHbf8gATttf8piYQ+FrtlBjK7 xia/T5jxqtz2SS2zLXI6INFHH1OnS+WsUVBIGfRxgFHp93/yBuBha5Hvn1hDOwV4tVad 0JoRZ5NlG0+4w+UUNrh9xjX/wKMqTdZbfI56Og0dD3NsMZ7K973oZ9ubKgeSYAa9eWOC FGzXDqljf+WcCGNclPuKj3IJ15m39udovL6X16M9jYsMKY5NhOhYFzeExKT1xCqXjwMM 0WNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hTiVa7CV; 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r10-20020a170906364a00b00993629db66asi875324ejb.72.2023.07.02.16.24.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jul 2023 16:24:31 -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=@gcc.gnu.org header.s=default header.b=hTiVa7CV; 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 368E43858289 for ; Sun, 2 Jul 2023 23:24:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 368E43858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688340270; bh=TCdfmChNeqGYguLpQs3MjxeYSWZkVWCX38zz2TaSeDA=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hTiVa7CVza5yLPYIF4Piubtg64T9RXo/6ztMubIQg2BLrbR1EonmUFOutGxQdV8ZC +m1ekSymFKF2lGIkmxOFfN/lMPW+6VrvCHD2ic2x3NdK3NQcJ9hP9M4Bpvmu6j6hPP CG0soviNifHVSWD5//A7YYg46mdtsh8HbPWfmXBA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id 171373858412 for ; Sun, 2 Jul 2023 23:23:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 171373858412 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4QvQ9959ydz9sVv; Mon, 3 Jul 2023 01:23:41 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Iain Buclaw Subject: [committed] d: Fix testcase failure of gdc.dg/Wbuiltin_declaration_mismatch2.d. Date: Mon, 3 Jul 2023 01:23:39 +0200 Message-Id: <20230702232339.3957011-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SCC_5_SHORT_WORD_LINES, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw 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?1770353088961157434?= X-GMAIL-MSGID: =?utf-8?q?1770353088961157434?= Hi, Seen at least on aarch64-*-darwin, the parameters used to instantiate the shufflevector intrinsic meant the return type was __vector(int[1]), which resulted in the error: vector type '__vector(int[1])' is not supported on this platform. All instantiations have now been fixed so the expected warning/error is now given by the compiler. Regression tested on x86_64-linux-gnu/-m32, committed to mainline, and backported to releases/gcc-13. Regards, Iain. --- gcc/testsuite/ChangeLog: * gdc.dg/Wbuiltin_declaration_mismatch2.d: Fix failed tests. --- .../gdc.dg/Wbuiltin_declaration_mismatch2.d | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d index 7b83fffae58..0d12bcb8b07 100644 --- a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d +++ b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d @@ -77,32 +77,32 @@ void test_shuffle() void test_shufflevector() { - shufflevector!(int, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 1" } - shufflevector!(double, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 1" } - shufflevector!(fake4, int4, int)(f, 0, 0); // { dg-warning "mismatch in argument 1" } - - shufflevector!(int4, int, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } - shufflevector!(int4, double, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } - shufflevector!(int4, int4, int)(0, 0, 0); - shufflevector!(int4, short8, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } - shufflevector!(int4, float4, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } - shufflevector!(int4, byte16, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } - shufflevector!(int4, fake4, int)(0, f, 0); // { dg-warning "mismatch in argument 2" } - - shufflevector!(int4, int4, double)(0, 0, 0); // { dg-warning "mismatch in argument 3" } - shufflevector!(int4, int4, int4)(0, 0, 0); // { dg-warning "mismatch in argument 3" } - shufflevector!(int4, int4, short8)(0, 0, 0); // { dg-warning "mismatch in argument 3" } - shufflevector!(int4, int4, float4)(0, 0, 0); // { dg-warning "mismatch in argument 3" } - shufflevector!(int4, int4, byte16)(0, 0, 0); // { dg-warning "mismatch in argument 3" } - - shufflevector!(int4, int4, int, double)(0, 0, 0, 0); // { dg-warning "mismatch in argument 4" } + shufflevector!(int, int4, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 1" } + shufflevector!(double, int4, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 1" } + shufflevector!(fake4, int4, int, int, int, int)(f, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 1" } + + shufflevector!(int4, int, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 2" } + shufflevector!(int4, double, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 2" } + shufflevector!(int4, int4, int, int, int, int)(0, 0, 0, 0, 0, 0); + shufflevector!(int4, short8, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, float4, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, byte16, int, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, fake4, int, int, int, int)(0, f, 0, 0, 0, 0); // { dg-warning "mismatch in argument 2" } + + shufflevector!(int4, int4, double, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, int4, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, short8, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, float4, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, byte16, int, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 3" } + + shufflevector!(int4, int4, int, double, int, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 4" } shufflevector!(int4, int4, int, int, double, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 5" } shufflevector!(int4, int4, int, int, int, double)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 6" } int i; - shufflevector!(int4, int4, int)(0, 0, i); // { dg-error "argument .i. cannot be read at compile time" } - shufflevector!(int4, int4, int)(0, 0, -1u); // { dg-error "element index .-1. is out of bounds" } - shufflevector!(int4, int4, int)(0, 0, 8); // { dg-error "element index .8. is out of bounds" } + shufflevector!(int4, int4, int, int, int, int)(0, 0, i, 0, 0, 0); // { dg-error "argument .i. cannot be read at compile time" } + shufflevector!(int4, int4, int, int, int, int)(0, 0, -1u, 0, 0, 0); // { dg-error "element index .-1. is out of bounds" } + shufflevector!(int4, int4, int, int, int, int)(0, 0, 8, 0, 0, 0); // { dg-error "element index .8. is out of bounds" } } void test_convertvector()