This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47348] wrong string length with array constructor
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Jan 2011 07:20:21 +0000
- Subject: [Bug fortran/47348] wrong string length with array constructor
- Auto-submitted: auto-generated
- References: <bug-47348-4@http.gcc.gnu.org/bugzilla/>
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?