[Bug fortran/51055] deferred length character allocation: allocate(character(len=i)::s) rejected

jpr at csc dot fi gcc-bugzilla@gcc.gnu.org
Thu Nov 10 08:14:00 GMT 2011


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



More information about the Gcc-bugs mailing list