This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31390] New: ICE due to transfer function


I receive the following ICE:
transferbug.f90: In function ?bucketindexofkey?:
transferbug.f90:14: internal compiler error: in gfc_get_element_type, at
fortran/trans-types.c:741

when compiling this test code:

module InternalCompilerError

   type Byte
      private
      character(len=1)                                  :: singleByte
   end type

contains

   function BucketIndexOfKey(key) result (hash)
      type(Byte), intent(in)                            :: key(:)
      integer                                           :: hash
      integer, parameter                                :: intPrototype(1) = 0
      integer                                           :: intKey(
size(transfer(key, intPrototype)) )
      intKey = transfer(key, intPrototype)   ! This line causes the ICE
      hash = 0
   end function

end module

program main
   use InternalCompilerError
end program


The ICE seems to disappear when removing the following line, which makes me
think that it is the direct cause:

      intKey = transfer(key, intPrototype)   ! This line causes the ICE


Regards,
Drew McCormack


-- 
           Summary: ICE due to transfer function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drewmccormack at mac dot com
 GCC build triplet: 4.3.0 20070316 (experimental)
GCC target triplet: powerpc-apple-darwin8.9.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31390


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]