summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/userdef_operator_2.f90
blob: 83392c6b6c391886758f91195ec8025425730fe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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