summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_ptr_27.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_27.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_27.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
new file mode 100644
index 00000000000..83f09598110
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/44446
+!
+! Contributed by Marco Restelli.
+!
+! Procedure pointer with PROTECTED was wrongly rejected.
+!
+module m
+ implicit none
+ abstract interface
+ pure function i_f(x) result(y)
+ real, intent(in) :: x
+ real :: y
+ end function i_f
+ end interface
+ procedure(i_f), pointer, protected :: p_f => null()
+end module m
+
+! { dg-final { cleanup-modules "m" } }