public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45440]  New: [OOP] ALLOCATE with SOURCE gives an ICE (segfault)
@ 2010-08-28 11:17 burnus at gcc dot gnu dot org
  2010-08-28 11:34 ` [Bug fortran/45440] " janus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-28 11:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-29 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-28 11:17 [Bug fortran/45440] New: [OOP] ALLOCATE with SOURCE gives an ICE (segfault) burnus at gcc dot gnu dot org
2010-08-28 11:34 ` [Bug fortran/45440] " janus at gcc dot gnu dot org
2010-08-28 11:46 ` [Bug fortran/45440] [F03] " janus at gcc dot gnu dot org
2010-08-28 11:51 ` janus at gcc dot gnu dot org
2010-08-28 11:55 ` janus at gcc dot gnu dot org
2010-08-28 14:06 ` burnus at gcc dot gnu dot org
2010-08-29 17:23 ` janus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).