title: Dynamic allocation of string arrays in Fortran does not resize
body: <p>Consider the following Fortran program:</p>
  
  <pre><code>program test
  character(len=:), allocatable :: str
  allocate(character(3) :: str)
  print *, len(str)
  str = '12345'
  print *, len(str)
  end program
  </code></pre>
  
  <p>When I run this I get the expected result:</p>
  
  <pre><code>   3
     5
  </code></pre>
  
  <p>That is, the character string was resized from 3 to 5 when str was set to '12345'. If, instead, I use an array of dynamic strings this is not true. Example:</p>
  
  <pre><code>program test
  character(len=:), allocatable :: str(:)
  allocate(character(3) :: str(2))
  print *, len(str(1)), len(str(2))
  str(1) = '12345'
  print *, len(str(1)), len(str(2))
  end program
  </code></pre>
  
  <p>When I run this I get:</p>
  
  <pre><code>   3           3
     3           3
  </code></pre>
  
  <p>So the set of str(1) did not change the length the string. I get the same behavior with ifort 16.0.2 and gfortran 5.3.1. My question is this behavior consistent with the latest Fortran standard or is this a bug in the compilers?</p>