From patchwork Wed Nov 22 21:02:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Anlauf X-Patchwork-Id: 1867500 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=anlauf@gmx.de header.a=rsa-sha256 header.s=s31663417 header.b=WYTvaEUm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SbDHF3wGsz1yRg for ; Thu, 23 Nov 2023 08:03:21 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E65038AA255 for ; Wed, 22 Nov 2023 21:03:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id 715ED3857C6F; Wed, 22 Nov 2023 21:02:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 715ED3857C6F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 715ED3857C6F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700686964; cv=none; b=alkiCtDYdBz016aDv2Syc8ibpuAmbLfM8fYdqoxBAERmHZzyw7FD/sFPaqiPLzzetlJz05PVFtGdmYCIxMYvjRe2TB+bgSdO3n+RYKLMdfWomSkl+SG8bwNZbxKnjlFaSpxgOPnWzYRI9/pfULd2xUEf1qZ+BKm6oir0rVV0NFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700686964; c=relaxed/simple; bh=sLOgXk1U1ltKTN2JkylYfDIfbt1qSXcdF2PtrUZOfIQ=; h=DKIM-Signature:MIME-Version:Message-ID:From:To:Subject:Date; b=eFm0HYMz0OrtzgIYdGdeqX2/vP510rUX4YVi7jtZ+NSkVlpedOE8/E7bhR/JDlQurJwg1nhCV7+CTjt7ju98pt+LDzexRaHunIK3RNK2ZyjfSTHauyV7XV0eM45dvxYJikD49TrXRGVnWPu4UBCrTkmKF5QTweEaI6gBbOSSAiM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1700686952; x=1701291752; i=anlauf@gmx.de; bh=sLOgXk1U1ltKTN2JkylYfDIfbt1qSXcdF2PtrUZOfIQ=; h=X-UI-Sender-Class:From:To:Subject:Date; b=WYTvaEUm4ZhB7g/+yZREKp71iIuqQ2ta7Pv4gLCv9NZLBUK70maTumFHn3296L4F FA1L174BcjpGJc9A4OsSQgku8x79457UtSH1Q6MZQkoRoh52ToWgsjM1zdY0xaoAX CRNV5fJtacu4/W+5wmDuQUSN+S2GyTGvce0K/ENNfnVzHvllqXguMaTNaldeW634C q/Ipzrh08gqQsJBSs0V3+2XTM18a4cp9VV2ZnKK7IMFpsFXisDt08ajhykW5LrEc2 MN8k5xeq08A7nEIKuHooX01KPdehITomtUmDs1vcmIzAhMNeaak5lNd2P3J8rQWKL 6w8VJOoxOqPe5p796g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [93.207.84.205] ([93.207.84.205]) by web-mail.gmx.net (3c-app-gmx-bs17.server.lan [172.19.170.69]) (via HTTP); Wed, 22 Nov 2023 22:02:32 +0100 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: fortran , gcc-patches Subject: [PATCH, testsuite, fortran] fix invalid testcases (missing MOLD argument to NULL) Date: Wed, 22 Nov 2023 22:02:32 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:ietp5WBCIRXoTPLvP5n78eIs3HNwcx/kAS9NNpjh2UysoWXkBjwGAkA701ZSUMo84VzKw 6t3wjIu9BLEiPOrbH3jdStlj/00fUsggpjZD2hPu/6U/0VZlcR+4mPNtXbphq0qqLvDl4JmNZZD5 3JfP9iVeDy2GSPIETue02NdMLU95W1IiVOlcIpeCeLIWCNEG5HkInAaHTze+5TN+3kenGU/xQUpt HKdUQ77sC5vSgGpJGWZDDNhe+gqVaZ3gUtNJYQq4aUTU+V2obIvSYNEqCwmxRdYTCoSVcKJi0zrG b0= UI-OutboundReport: notjunk:1;M01:P0:yW+B2vhCuyI=;tk5v5F1RXuvs2JU79BEiVX5Rbt2 72ESDfjxciuVMXSfcII2zDqQqxCg/mOiSmwjUG162/9itdEGjmVYXz/22LAn2PSpgkhctI8q3 2VPVT6yNpWZi7xvfrZ74vn9sk2ytdc6VmxsEamRE4M01b08ciiJ1cZG3VGWwEoZ5VX6TsX7qH mqZEks17YM/LhQnYj6VANZ22N2Y7rL+Gxr+f8FecelDoTbSrSfHacHu3n+AH3AEdRIRK7ttMb PrZTZFkQJ09QHFkncdWJlTHDbyan4d7CYm1neuNzQX4lWyNm4i3yydNdREJ6bTGvl0kkeZMaJ hPJlPzKILY86gi50ynoitIF+RJs9BbH7CI8SQD7ErqaPM1cvbQcJTBUtEAd7LtBpC3WE+A2Yn Ksbgkh4CGk94mPOFrlWZjUkDbfKnVB9frIR9+ruzTgwfEH7OO8jxqfnFCKUo+L6ZapMNY/AnF vRItX/KsWQp7cP19Ibn60u7g3KTCp1HBCfA2AUVNFzu/Ozbx6JtOsbw0ssl7LBqWyIssZAAoK Qh1RLTA/RQWghtxyauMQTbQ0S/4RVloh0vfjDvd0q2yQqvuVVxkC0oQf6NwT/PWEXJhvMhomd GccNQA3xNvR6OkJonOdSNrdcpMJdA/BKFetwrkoiYdl5/EngZwA1ebzNqctwgtraD2PsdrhWd XYjCeCNfve+4v07eXdKu03nNMAvI7FZiTFnzIWyk355XwqAS8F2Gnbvy6ArLCaC/siMU5J93E p74OUeEr0i0gisjmxj7zIZQ3BsE3d9pRp2lYs6GV14muGxti8JijjgzrC7FJ2ndoXXNH4zHtM AQxHca8JNVDLoadGHpbJhYLUfA/ZHXbph6rHpAdftHvoA= X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Dear all, testcases assumed_rank_8.f90 and assumed_rank_10.f90 are invalid: NULL() is passed without MOLD to an assumed-rank dummy argument. This is detected by NAG, but not yet by gfortran (see pr104819). gfortran even ignores the MOLD argument; the dump-tree is identical if MOLD is there or not. Now these testcases are { dg-do run }. Therefore I would like to fix these testcases, independent of the work on fixing pr104819. Comments? Thanks, Harald From cbb0c61f9d6f06667666a33da6e6ce3213a92248 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 22 Nov 2023 21:45:46 +0100 Subject: [PATCH] testsuite: fortran: fix invalid testcases (missing MOLD argument to NULL) The Fortran standard requires that NULL() passed to an assumed-rank dummy argument has a MOLD argument. gcc/testsuite/ChangeLog: PR fortran/104819 * gfortran.dg/assumed_rank_10.f90: Add MOLD argument to NULL(). * gfortran.dg/assumed_rank_8.f90: Likewise. --- gcc/testsuite/gfortran.dg/assumed_rank_10.f90 | 6 +++--- gcc/testsuite/gfortran.dg/assumed_rank_8.f90 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_10.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_10.f90 index 6a3cc94483e..f22d43ab955 100644 --- a/gcc/testsuite/gfortran.dg/assumed_rank_10.f90 +++ b/gcc/testsuite/gfortran.dg/assumed_rank_10.f90 @@ -50,9 +50,9 @@ program test is_present = .false. - call fpa(null(), null()) ! No copy back - call fpi(null(), null()) ! No copy back - call fno(null(), null()) ! No copy back + call fpa(null(iip), null(jjp)) ! No copy back + call fpi(null(iip), null(jjp)) ! No copy back + call fno(null(iip), null(jjp)) ! No copy back call fno() ! No copy back diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_8.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_8.f90 index 5873296a7a5..34ff42c0be2 100644 --- a/gcc/testsuite/gfortran.dg/assumed_rank_8.f90 +++ b/gcc/testsuite/gfortran.dg/assumed_rank_8.f90 @@ -22,13 +22,13 @@ program main call f (ii) call f (489) call f () - call f (null()) + call f (null(kk)) call f (kk) if (j /= 2) STOP 1 j = 0 nullify (ll) - call g (null()) + call g (null(ll)) call g (ll) call g (ii) if (j /= 1) STOP 2 -- 2.35.3