[Bug fortran/44672] [F08] ALLOCATE with SOURCE and no array-spec
zmi007 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 29 12:10:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44672
zmi <zmi007 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zmi007 at gmail dot com
--- Comment #13 from zmi <zmi007 at gmail dot com> ---
(In reply to vehre from comment #12)
Does it fix also the same situation with mold= specifier? f.e. in this simple
program?
program test_mold
integer, allocatable, dimension(:) :: a,b
type ac
integer :: a
end type ac
type(ac), allocatable, dimension(:) :: aa,bb
allocate(a(10))
allocate(aa(10))
allocate (b, mold=a) !<---
allocate (bb, mold=aa) !<---
end program test_mold
gfortran --version
GNU Fortran (SUSE Linux) 5.2.1 20150721 [gcc-5-branch revision 226027]
Copyright (C) 2015 Free Software Foundation, Inc.
gfortran test_mold.f90 -o test_mold.xtest_mold.f90:11:13:
allocate (b, mold=a)
1
Error: Array specification required in ALLOCATE statement at (1)
test_mold.f90:13:13:
allocate (bb, mold=aa)
1
Error: Array specification required in ALLOCATE statement at (1)
Interpretation of F2008 6.7.1.2 is a bit tedious but mold= should work similar
to source= specifier ?
More information about the Gcc-bugs
mailing list