[Bug fortran/47348] wrong string length with array constructor

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 20 09:19:00 GMT 2011


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org
             Blocks|                            |32834

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-01-20 07:20:17 UTC ---
More reduced test case:

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

  q = 'abcd'
  i = 2
  print fmt, (/q(1:i) /),"|"

end program main

produces

ab  |

May be related to PR 44735, which is also an issue with
substrings with non-constant length.

Paul, this is a case of something (trans-*?) picking up the
wrong string length and ignoring the substring.  Do you have
any idea where to start looking?



More information about the Gcc-bugs mailing list