https://gcc.gnu.org/g:ba4b4b3864d426835ea10e900a4e1dd466d06e51

commit r13-8442-gba4b4b3864d426835ea10e900a4e1dd466d06e51
Author: Harald Anlauf <anl...@gmx.de>
Date:   Wed Nov 22 21:45:46 2023 +0100

    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.
    
    (cherry picked from commit 7646b5d88056cf269ff555afe95bc361dcf5e5c0)

Diff:
---
 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

Reply via email to