From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; 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 To: Richard Biener , Robin Dapp , 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: Reply-To: Jakub Jelinek References: <0424a09b-6867-4be9-8207-9d92a6187191@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 List-Id: 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 DEB58385C401 for ; Sun, 3 Dec 2023 18:32:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEB58385C401 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 DEB58385C401 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=1701628360; cv=none; b=o5e3hErbHhf9cWGaLyknGLDwK/0nTz8ybJQthss6T8t3ym3zze4+ikqDlhWcChijFeruBB54UkH+RZPLPoPHBbdZ5x1o4M7a5kpUTnfGYbUXhSZOQylM6AAARah5jv388aTE27T+B8t5ehG+YzXgUIjgucZwYF/WSINWradZxHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701628360; c=relaxed/simple; bh=0ONELqjNMClUt8vCpT9fir7VkZCVoFIO7t0IpI646XI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=QtLh0xXrMHmEJ8Oikf6SStJ3q6eXMUOEqmfM0K57E3ka0I8eoNu8SUcQuGiSw75Xr7f+e8YPBlYEDQRN76Xn1pLzZXl09mmv6Jz4F77QJ5prx+qLL8qcbTJ2PD5LrvpgdHE+eCvfwujUUmyGQk8OuszJhEs89fB1Bry7XtGPQfQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701628358; 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=PBc+8PwPeQGntlhfvRCYDW6mVPpFT79PV9kHE9zsx46F19O/4vHSDSNzGzrHvAVpBYzhZH YlWugmoBv/N5ucmreZrynDSPlw+83oCOnyKgufiN5GnitWruwQLeJcByHwI1an02+3rp4p 61oDOHRAu6t1p2p3C1i8FtgzfX1JQTM= 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-489-hwfcYN31Ou29nXBUrAzUvQ-1; Sun, 03 Dec 2023 13:32:35 -0500 X-MC-Unique: hwfcYN31Ou29nXBUrAzUvQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 0D7BF82A621; Sun, 3 Dec 2023 18:32:35 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC6DB36E2; Sun, 3 Dec 2023 18:32:31 +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 3B3IWTqr3655667 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 3 Dec 2023 19:32:29 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B3IWSas3655666; Sun, 3 Dec 2023 19:32:28 +0100 Date: Sun, 3 Dec 2023 19:32:28 +0100 From: Jakub Jelinek To: Richard Biener , Robin Dapp , Florian Weimer Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up gcc.target/aarch64/pr112406.c for modern C [PR112406] Message-ID: Reply-To: Jakub Jelinek References: <0424a09b-6867-4be9-8207-9d92a6187191@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.1 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 List-Id: Message-ID: <20231203183228.uM_zCMGzXPegpugusPpGdbmCq14WVEtsSxOT5kxn1qg@z> 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 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