Message ID | ZWzJot9+UHOofuSX@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2361609vqy; Sun, 3 Dec 2023 10:32:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0b+W7b3RM0FB/ESh24lzP2Sd2sju2tfehWwQRCLJiV05C2MP8HK5gm9UyAS0Zw8bUEpY/ X-Received: by 2002:a05:620a:1125:b0:77e:fbba:645a with SMTP id p5-20020a05620a112500b0077efbba645amr3952329qkk.57.1701628357818; Sun, 03 Dec 2023 10:32:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701628357; cv=pass; d=google.com; s=arc-20160816; b=RlKaoqiOoN4sa+LQIvhgXkb2aOxPCHXtha/nOdPG/srhpZvjqg9a3A2UY/ccoZF2Od 8buhfmPqj3RGvE3wj7mYHLtcWmu7pRoXVe4uLYHTKkaGEsG4d1I9Gb1+OYo03tCZ7ORI /wlsvwqbidh7/+ENNBpMZZKqmaox4sB9qNNBpaRf5pKMHPdZZqcR19LfGYSiUuo4YIB3 reA/2fC8LAUtl0xk2UynpGdUD8MWEoieD1rV6VuFV5udNa6Fu4mH3mO/+KfX45QOBj+j b92uFq1yrEEv9SNAbZJF1oRKy1s+5VtLTbULFfMXOD7uRo9NUhrrvuXHwu4UFmNEPbgp cx5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=U55ijGtv2TIx9ByEwvJkCoJYKM4iS/eb8eiJ0uVietM=; fh=haVfzoytcFNFIBju11XmOlPs03HuLeL3ieCXTDfnvhc=; b=puN8A+aOrvDi1+pceauHlSnTbs+tk6NJLEUY89wa862Ma4ku3NPZpeD+1XkUn6aaZb Mb3CGRO/YWEiKPYlfg/yu+WnBvLQO1n69d/D9henpAMfeJCCR1dkvgIvwv94Wi5Knk0i EhXuMPnda6Nkvb7rsrwmfIo9LNwY46fh7KaNZ6WqVprWRidFxOizaX4g/sIZpxbXSoZj GQT6djv255CRaX1mArdEBsVRxljbrCs5wgaDQnE4zmhgdTea2WR+l86cKyfyTPYg9sdU l7LIkieMNINguZ7TkLyV2NNrLAVK3erM0sBSki4tojuNe3MnAdcGx/uOjz/qbe8R/Wj6 p24A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NkbkNbiw; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 16-20020a05620a041000b0077da9bb9890si7432850qkp.6.2023.12.03.10.32.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 10:32:37 -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=@redhat.com header.s=mimecast20190719 header.b=NkbkNbiw; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 94BD1385782A for <ouuuleilei@gmail.com>; Sun, 3 Dec 2023 18:32:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1BEC73858425 for <gcc-patches@gcc.gnu.org>; Sun, 3 Dec 2023 18:32:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BEC73858425 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1BEC73858425 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701628334; cv=none; b=Tm2g1royMdthNO0B7gpONwQhMHuLVop5MwfCyRNSVeIv6SBehE+IrEvS8bnyUFSvXKw0Hia0asWywc+tuUOdUVWOvxVh5S18DvL+Xuh0PWhKrcmKfqfRwOQW1Kv5ITQmDBlFZT3mxJk6AapYvEq8VW1A2L3t3AwbMgSk2txHwR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701628334; c=relaxed/simple; bh=0ONELqjNMClUt8vCpT9fir7VkZCVoFIO7t0IpI646XI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=MRjkCLjik8dK9N7XX4eTHgIsjF9Z5KUnHU67wJkcYt/LTdEo1C2u//Gbla7Ev9jnTm7dojlrF7tirBDC3VThNGcwgNIBnZkFyVOTRMPrizfbpc+wTdE4+B2AdGgI0H2/8/HFPDkV6R7N5ncKofINJW5/4UYCaGvJTAh+lVUTfSo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701628330; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=U55ijGtv2TIx9ByEwvJkCoJYKM4iS/eb8eiJ0uVietM=; b=NkbkNbiwtM7WcS9G/2abB3+geidA0hvI80H75MzAKJ5tCJjV1fsp+Ct6dDK4LeS15arXxE Kjn6Ov82AYeINPk/BxlsW10l+/at6bXehS9QvWwc3DEINlVIMRF2d5O6pX20xokbdkopTu 8c33ydGBhv8ccu37wrGBOfvw6JUJDok= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-b4_VZ4pjNI2Ibk2AJkpO7g-1; Sun, 03 Dec 2023 13:32:07 -0500 X-MC-Unique: b4_VZ4pjNI2Ibk2AJkpO7g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DC7A85A58A; Sun, 3 Dec 2023 18:32:07 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEE0A10E46; Sun, 3 Dec 2023 18:32:06 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3B3IW30p3655659 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 3 Dec 2023 19:32:04 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B3IW2Aq3655658; Sun, 3 Dec 2023 19:32:02 +0100 Date: Sun, 3 Dec 2023 19:32:02 +0100 From: Jakub Jelinek <jakub@redhat.com> To: Richard Biener <rguenther@suse.de>, Robin Dapp <rdapp.gcc@gmail.com>, fweimer@tucnak.zalov.cz Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up gcc.target/aarch64/pr112406.c for modern C [PR112406] Message-ID: <ZWzJot9+UHOofuSX@tucnak> References: <e0b19ed9-08df-4df8-9acf-dfb8db419df9@gmail.com> <CAFiYyc1pz9fTyZSXarCYFz4oNEY0Dd3OxA=wW+LX+MOGrVFT8A@mail.gmail.com> <c074969c-afb2-42b5-9e96-fec2cb750640@gmail.com> <CAFiYyc3ei_OUTFt47peUbbjWPA35JZ52fSXWLT14_o_DTD+edQ@mail.gmail.com> <0424a09b-6867-4be9-8207-9d92a6187191@gmail.com> <CAFiYyc39g3Vb=xfPtoscRKCo6g4RZ7DC1+OAYvSNz-VjGvcUdw@mail.gmail.com> <5208e31f-f721-4df9-81b9-508a2e76accd@gmail.com> MIME-Version: 1.0 In-Reply-To: <5208e31f-f721-4df9-81b9-508a2e76accd@gmail.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784286657083111113 X-GMAIL-MSGID: 1784286657083111113 |
Series |
testsuite: Fix up gcc.target/aarch64/pr112406.c for modern C [PR112406]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Dec. 3, 2023, 6:32 p.m. UTC
On Fri, Nov 17, 2023 at 02:04:01PM +0100, Robin Dapp wrote: > > Yes, your version is also OK. > > The attached was bootstrapped and regtested on aarch64, x86 and > regtested on riscv. Going to commit it later unless somebody objects. Unfortunately the aarch64/pr112406.c was reduced too much and is rejected since the switch to modern C patchset. The following patch fixes that, I've verified the testcase before/after the changes still ICEs in r14-5563 and doesn't with r14-5564 and after the changes compiles fine with even latest trunk. Everything admittedly with a cross-compiler, but that shouldn't change anything. Ok for trunk? Note, one of the modern C changes is that at least when people use cvise/creduce/delta scripts which ensure no further errors are introduced during the reduction then expected originally such reductions will not appear anymore. 2023-12-03 Jakub Jelinek <jakub@redhat.com> PR middle-end/112406 * gcc.target/aarch64/pr112406.c (MagickPixelPacket): Add missing semicolon. (GetImageChannelMoments_image): Avoid using implicit int. (SetMagickPixelPacket): Use void return type instead of implicit int. (GetImageChannelMoments): Likewise. Use __builtin_atan instead of atan. Jakub
Comments
> Am 03.12.2023 um 19:32 schrieb Jakub Jelinek <jakub@redhat.com>: > > On Fri, Nov 17, 2023 at 02:04:01PM +0100, Robin Dapp wrote: >>> Yes, your version is also OK. >> >> The attached was bootstrapped and regtested on aarch64, x86 and >> regtested on riscv. Going to commit it later unless somebody objects. > > Unfortunately the aarch64/pr112406.c was reduced too much and is rejected > since the switch to modern C patchset. > > The following patch fixes that, I've verified the testcase > before/after the changes still ICEs in r14-5563 and doesn't with > r14-5564 and after the changes compiles fine with even latest trunk. > Everything admittedly with a cross-compiler, but that shouldn't change > anything. > > Ok for trunk? Ok > Note, one of the modern C changes is that at least when people use > cvise/creduce/delta scripts which ensure no further errors are introduced > during the reduction then expected originally such reductions will not > appear anymore. > > 2023-12-03 Jakub Jelinek <jakub@redhat.com> > > PR middle-end/112406 > * gcc.target/aarch64/pr112406.c (MagickPixelPacket): Add missing > semicolon. > (GetImageChannelMoments_image): Avoid using implicit int. > (SetMagickPixelPacket): Use void return type instead of implicit int. > (GetImageChannelMoments): Likewise. Use __builtin_atan instead of > atan. > > --- gcc/testsuite/gcc.target/aarch64/pr112406.c.jj 2023-11-18 09:35:20.944084686 +0100 > +++ gcc/testsuite/gcc.target/aarch64/pr112406.c 2023-12-03 19:05:16.109365791 +0100 > @@ -2,10 +2,10 @@ > /* { dg-options "-march=armv8-a+sve -w -Ofast" } */ > > typedef struct { > - int red > + int red; > } MagickPixelPacket; > > -GetImageChannelMoments_image, GetImageChannelMoments_image_0, > +int GetImageChannelMoments_image, GetImageChannelMoments_image_0, > GetImageChannelMoments___trans_tmp_1, GetImageChannelMoments_M11_0, > GetImageChannelMoments_pixel_3, GetImageChannelMoments_y, > GetImageChannelMoments_p; > @@ -15,10 +15,12 @@ double GetImageChannelMoments_M00_0, Get > > MagickPixelPacket GetImageChannelMoments_pixel; > > +void > SetMagickPixelPacket(int color, MagickPixelPacket *pixel) { > pixel->red = color; > } > > +void > GetImageChannelMoments() { > for (; GetImageChannelMoments_y; GetImageChannelMoments_y++) { > SetMagickPixelPacket(GetImageChannelMoments_p, > @@ -33,5 +35,5 @@ GetImageChannelMoments() { > GetImageChannelMoments_M01_1 += > GetImageChannelMoments_y * GetImageChannelMoments_p++; > } > - GetImageChannelMoments___trans_tmp_1 = atan(GetImageChannelMoments_M11_0); > + GetImageChannelMoments___trans_tmp_1 = __builtin_atan(GetImageChannelMoments_M11_0); > } > > > Jakub >
--- gcc/testsuite/gcc.target/aarch64/pr112406.c.jj 2023-11-18 09:35:20.944084686 +0100 +++ gcc/testsuite/gcc.target/aarch64/pr112406.c 2023-12-03 19:05:16.109365791 +0100 @@ -2,10 +2,10 @@ /* { dg-options "-march=armv8-a+sve -w -Ofast" } */ typedef struct { - int red + int red; } MagickPixelPacket; -GetImageChannelMoments_image, GetImageChannelMoments_image_0, +int GetImageChannelMoments_image, GetImageChannelMoments_image_0, GetImageChannelMoments___trans_tmp_1, GetImageChannelMoments_M11_0, GetImageChannelMoments_pixel_3, GetImageChannelMoments_y, GetImageChannelMoments_p; @@ -15,10 +15,12 @@ double GetImageChannelMoments_M00_0, Get MagickPixelPacket GetImageChannelMoments_pixel; +void SetMagickPixelPacket(int color, MagickPixelPacket *pixel) { pixel->red = color; } +void GetImageChannelMoments() { for (; GetImageChannelMoments_y; GetImageChannelMoments_y++) { SetMagickPixelPacket(GetImageChannelMoments_p, @@ -33,5 +35,5 @@ GetImageChannelMoments() { GetImageChannelMoments_M01_1 += GetImageChannelMoments_y * GetImageChannelMoments_p++; } - GetImageChannelMoments___trans_tmp_1 = atan(GetImageChannelMoments_M11_0); + GetImageChannelMoments___trans_tmp_1 = __builtin_atan(GetImageChannelMoments_M11_0); }