While looking at pr34080, I produced the following invalid code

module TransferBug

   type ByteType
      character(len=1)                                  :: singleByte
   end type

end module

program main
   use TransferBug
   type (ByteType)                                   :: bytes(4)
   print *, size(bytes)
   bytes = ByteType((/'H', 'i', '!', ' '/))  ! <-- ICE
!   bytes = (/ByteType('H'), ByteType('i'), ByteType('!'), ByteType(' ')/) !
<-- works
end program

which gives an ICE:

pr34080_ice.f90: In function 'MAIN__':
pr34080_ice.f90:12: internal compiler error: in
gfc_conv_array_constructor_expr, at fortran/trans-expr.c:2819


-- 
           Summary: internal compiler error: in
                    gfc_conv_array_constructor_expr, at fortran/trans-
                    expr.c:2819
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: powerpc-apple-darwin8
  GCC host triplet: powerpc-apple-darwin8
GCC target triplet: powerpc-apple-darwin8


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

Reply via email to