[Bug fortran/69834] New: Collision in derived type hashes
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 16 10:44:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69834
Bug ID: 69834
Summary: Collision in derived type hashes
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pault at gcc dot gnu.org
Target Milestone: ---
As reported by James van Buskirk on clf
https://groups.google.com/forum/#!topic/comp.lang.fortran/0bm3E5xJpkM
module types
implicit none
type CS5SS
integer x
real y
end type CS5SS
type SQS3C
logical u
character(7) v
end type SQS3C
contains
subroutine sub(x)
class(*), allocatable :: x
select type(x)
type is(CS5SS)
write(*,'(a)') 'TYPE IS CS5SS'
type is(SQS3C)
write(*,'(a)') 'TYPE IS SQS3C'
class default
write(*,'(a)') 'TYPE could not be determined'
end select
end subroutine sub
end module types
program test
use types
implicit none
class(*), allocatable :: u1, u2
allocate(u1,source = CS5SS(2,1.414))
allocate(u2,source = SQS3C(.TRUE.,'Message'))
call sub(u1)
call sub(u2)
end program test
Both derived types have the hash value 43152863.
Paul
More information about the Gcc-bugs
mailing list