[Bug fortran/47616] ICE with allocate(a,source=(/1/))
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Feb 5 17:31:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47616
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-02-05 17:31:19 UTC ---
Same error with mold:
ig25@linux-fd1f:~/Krempel/Arr> cat arr-3.f90
program main
implicit none
integer, dimension(:), allocatable :: a
allocate (a, mold=(/ 1 /))
end program main
ig25@linux-fd1f:~/Krempel/Arr> gfortran arr-3.f90
0x1450c70
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The test case from comment #1 is invalid F 2003:
C628 (R628) An allocate-shape-spec-list shall appear if and only if the
allocate-object is an array.
... but valid F 2008:
C633 (R631) If allocate-object is an array either allocate-shape-spec-list
shall appear or source-expr shall appear and have the same rank as
allocate-object. If allocate-object is scalar, allocate-shape-spec-list shall
not appear.
More information about the Gcc-bugs
mailing list