This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51055] deferred length character allocation: allocate(character(len=i)::s) rejected
- From: "jpr at csc dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Nov 2011 06:09:07 +0000
- Subject: [Bug fortran/51055] deferred length character allocation: allocate(character(len=i)::s) rejected
- Auto-submitted: auto-generated
- References: <bug-51055-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51055
--- Comment #2 from jpr at csc dot fi 2011-11-10 06:09:07 UTC ---
OK, i found and lost the PR that included this. However,
your workaround doesn't seem to work either:
program a
character(len=:),allocatable::s
integer::j=2
s=repeat(' ',j)
print*,len(s),len(repeat(' ',j))
end program a
gfortran -o a a.f90; ./a
2846708 2