diff options
Diffstat (limited to 'gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90')
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90 new file mode 100644 index 000000000..67e65f81f --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90 @@ -0,0 +1,13 @@ +! This is the testcase from PR 12841. We used to report a type/rank mismatch +! when passing NULL() as an argument to a function. + MODULE T + PUBLIC :: A + CONTAINS + SUBROUTINE A(B) + REAL, POINTER :: B + IF (ASSOCIATED(B)) CALL ABORT() + END SUBROUTINE A + END MODULE T + USE T + CALL A(NULL()) + END |