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/45440] New: [OOP] ALLOCATE with SOURCE gives an ICE (segfault)


The following segfaults with the current trunk, a 20100701 trunk, and a 4.5.1
build.


type t
  integer :: x
  real :: y(5)
  logical, allocatable :: z(:)
end type t

type(t) :: mt

mt%x = 1
mt%y = [1,2,3,4,5]
allocate ( mt%z, source = [ .true., .false., .true.]) ! <<< ICE(segfault)
print *, mt%x
print *, mt%y
print *, mt%z
!print *, mt ! Invalid - ultimate allocatable component
end


Expected: As with ifort and crayftn: It compiles and ./a.out prints
 1
 1.,  2.,  3.,  4.,  5.
 T,  F,  T


-- 
           Summary: [OOP] ALLOCATE with SOURCE gives an ICE (segfault)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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