diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_ptr_40.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_ptr_40.f90 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_40.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_40.f90 new file mode 100644 index 00000000000..dae91df1c3c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_ptr_40.f90 @@ -0,0 +1,23 @@ +! { dg-do compile } +! +! PR 56261: [OOP] seg fault call procedure pointer on polymorphic array +! +! Contributed by Andrew Benson <abensonca@gmail.com> + + implicit none + type :: nc + end type + external :: qq + procedure( ), pointer :: f1 + procedure(ff), pointer :: f2 + + f1 => ff ! { dg-error "Explicit interface required" } + f2 => qq ! { dg-error "Explicit interface required" } + +contains + + subroutine ff (self) + class(nc) :: self + end subroutine + +end |