diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/userdef_operator_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/userdef_operator_2.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/userdef_operator_2.f90 b/gcc/testsuite/gfortran.dg/userdef_operator_2.f90 new file mode 100644 index 000000000..83392c6b6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/userdef_operator_2.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! PR 45338 - no ICE when cmp is not used explicitly. +! Test case by Simon Smart +module test_mod + implicit none +contains + subroutine test_fn (cmp) + interface operator(.myop.) + pure function cmp (a, b) result(ret) + integer, intent(in) :: a, b + logical ret + end function cmp + end interface + integer :: a, b + print*, a .myop. b + end subroutine test_fn +end module test_mod |