This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45170] [F2003] allocatable character lengths
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2011 14:20:07 +0000
- Subject: [Bug fortran/45170] [F2003] allocatable character lengths
- Auto-submitted: auto-generated
- References: <bug-45170-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170
--- Comment #15 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-07-12 14:19:24 UTC ---
On Tue, Jul 12, 2011 at 01:51:40PM +0000, boschmann at tp1 dot
physik.uni-siegen.de wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170
>
> Hans-Werner Boschmann <boschmann at tp1 dot physik.uni-siegen.de> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |boschmann at tp1 dot
> | |physik.uni-siegen.de
>
> --- Comment #14 from Hans-Werner Boschmann <boschmann at tp1 dot physik.uni-siegen.de> 2011-07-12 13:51:08 UTC ---
> I've got one more item for the TODO list:
>
> character(:),allocatable::string
> integer::length
> length=5
> allocate(character(len=length)::string)
>
> This is not yet accepted by gfortran. Is there any other way to allocate
> "string" without a primitive like string=repeat(" ",10)?
laptop:kargl[212] gfc4x -o z g.f90
laptop:kargl[213] ./z
yes!!
laptop:kargl[214] cat g.f90
character(:),allocatable::string
string='yes!!'
print *, string
end