This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45440] [F03] ALLOCATE with SOURCE gives an ICE (segfault)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2010 14:05:43 -0000
- Subject: [Bug fortran/45440] [F03] ALLOCATE with SOURCE gives an ICE (segfault)
- References: <bug-45440-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from burnus at gcc dot gnu dot org 2010-08-28 14:05 -------
(In reply to comment #4)
> It works though when explicitly specifying the size of z to allocate:
>
> logical, allocatable :: z(:)
> allocate ( z(3), source = [ .true., .false., .true. ] )
Congratulation - you have found another bug:
"C633 (R631) If allocate-object is an array either allocate-shape-spec-list
shall appear or source-expr shall appear [...]"
In your example both appear. ("source-expr" is either SOURCE= or MOLD=.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45440