1! { dg-do compile }
2!
3! PR fortran/45916
4! ICE with generic type-bound operator
5
6module m_sort
7  implicit none
8  type, abstract :: sort_t
9  contains
10    generic :: operator(.gt.) => gt_cmp
11    procedure(gt_cmp), deferred :: gt_cmp
12  end type sort_t
13  interface
14    logical function gt_cmp(a,b)
15      import
16      class(sort_t), intent(in) :: a, b
17    end function gt_cmp
18  end interface
19end module m_sort
20