diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/generic_33.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/generic_33.f90 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/generic_33.f90 b/gcc/testsuite/gfortran.dg/generic_33.f90 new file mode 100644 index 00000000000..540d73b23f0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/generic_33.f90 @@ -0,0 +1,27 @@ +! { dg-do compile } +! +! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE +! +! Contributed by Janus Weil <janus@gcc.gnu.org> + + type :: t + end type + + interface test + procedure testAlloc + procedure testPtr + end interface + +contains + + logical function testAlloc(obj) + class(t), allocatable :: obj + testAlloc = .true. + end function + + logical function testPtr(obj) + class(t), pointer :: obj + testPtr = .false. + end function + +end |