aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/nullarg.f90
new file mode 100644
index 000000000..67e65f81f
--- /dev/null
+++ b/gcc-4.9/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