This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]