Index: gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 |
diff --git a/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 b/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 |
index 69bf140b818c7775a6d3c8749acfd50dce9c0748..4e8b3c2531428260593f190478212cfad78165fa 100644 |
--- a/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 |
+++ b/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 |
@@ -16,13 +16,36 @@ program bsp |
procedure( up ) , pointer :: pptr |
procedure(isign), pointer :: q |
- ! TODO. See PR 38290. |
- !pptr => add ! { "Interfaces don't match" } |
+ procedure(iabs),pointer :: p1 |
+ procedure(f), pointer :: p2 |
+ |
+ pointer :: p3 |
+ interface |
+ function p3(x) |
+ real(8) :: p3,x |
+ intent(in) :: x |
+ end function p3 |
+ end interface |
+ |
+ pptr => add ! { dg-error "is not a subroutine" } |
q => add |
print *, pptr() ! { dg-error "is not a function" } |
+ p1 => iabs |
+ p2 => iabs |
+ p1 => f |
+ p2 => f |
+ p2 => p1 |
+ p1 => p2 |
+ |
+ p1 => abs ! { dg-error "Type/kind mismatch in return value" } |
+ p2 => abs ! { dg-error "Type/kind mismatch in return value" } |
+ |
+ p3 => dsin |
+ p3 => sin ! { dg-error "Type/kind mismatch in return value" } |
+ |
contains |
function add( a, b ) |
@@ -31,4 +54,9 @@ program bsp |
add = a + b |
end function add |
+ integer function f(x) |
+ integer,intent(in) :: x |
+ f = 317 + x |
+ end function |
+ |
end program bsp |