[Bug fortran/51293] New: [OOP] ICE on ANY with overloaded == operator
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 24 11:42:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
CC: burnus@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.
More information about the Gcc-bugs
mailing list