http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51293
Bug #: 51293 Summary: [OOP] ICE on ANY with overloaded == operator Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: bur...@gcc.gnu.org module stuff implicit none type a integer :: i, j end type a interface operator (==) module procedure equal_a end interface operator (==) contains elemental function equal_a (x,y) result (same) class (a), intent(in) :: x, y logical :: same if ( x%i == y%i .and. x%j == y%j ) then same = .TRUE. else same = .FALSE. end if end function equal_a end module stuff program bugtest use stuff type (a), dimension(10) :: h type (a) :: g integer :: i if ( any(h == g) ) then write (*,*) end if end program bugtest ICEs on the trunk as well as 4.6 branch.