diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_decl_5.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_decl_5.f90 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_5.f90 b/gcc/testsuite/gfortran.dg/proc_decl_5.f90 new file mode 100644 index 000000000..b327d5c12 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_decl_5.f90 @@ -0,0 +1,28 @@ +! { dg-do run } +! PR fortran/33945 +! +! PROCEDURE in the interface was wrongly rejected +module modproc + implicit none + interface bar + procedure x + end interface bar + procedure(sub) :: x + interface + integer function sub() + end function sub + end interface +end module modproc + +integer function x() + implicit none + x = -5 +end function x + +program test + use modproc + implicit none + if(x() /= -5) call abort() +end program test + +! { dg-final { cleanup-modules "modproc" } } |