[Bug fortran/45440] [F03] ALLOCATE with SOURCE gives an ICE (segfault)

quantheory at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jun 17 01:06:00 GMT 2013


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

Sean Santos <quantheory at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |quantheory at gmail dot com

--- Comment #10 from Sean Santos <quantheory at gmail dot com> ---
If it should be an error to specify both a shape spec and a source array, then
that's something that's only come up with this bug. Everything else is probably
a duplicate of PR 44672 or PR 44529.

However, you have to be careful, since it is legal to specify a shape spec and
a source scalar, e.g.:

integer, allocatable :: a(:)
integer :: b = 2
allocate(a(3), source=b)
print *,a
end



More information about the Gcc-bugs mailing list