http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47348

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|substring with len_trim in  |wrong string length with
                   |array constructor           |array constructor

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-01-19 
19:14:04 UTC ---
Reduced test case:

program main
  implicit none
  character(len=*), parameter :: fmt='(2(A,"|"))'
  integer :: i
  character(len=4) :: q

  q = 'yy'
  i = 2

  print fmt, (/ trim(q), 'ae' /)//'c'
  print fmt, (/ q(1:i), 'ae' /)//'c'

end program main

This prints

yyc|aec|
yy  c|ae  c|

so the string length of the array constructor is wrong.

Reply via email to