diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 new file mode 100644 index 00000000000..0e60cbb2a81 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 @@ -0,0 +1,20 @@ +! { dg-do compile } +! +! PR 40541: Assignment checking for proc-pointer => proc-ptr-returning-function() +! +! Contributed by Tobias Burnus <burnus@gcc.gnu.org> + +program test + procedure(real), pointer :: p + p => f() ! { dg-error "Type/kind mismatch in return value" } +contains + function f() + pointer :: f + interface + logical(1) function f() + end function + end interface + f = .true._1 + end function f +end program test + |