[Bug fortran/31487] New: Character array initialization in derived type: bad zero padding
anlauf at gmx dot de
gcc-bugzilla@gcc.gnu.org
Thu Apr 5 13:50:00 GMT 2007
Hi,
here's an annoying one. Default initializing a
character array in a derived type leads to zero
padded strings instead of space-padded ones.
E.g.
! This works correctly:
character(len=16) :: tdefi(2) = (/'0z1jan0000','1hr '/)
! 1234567890
! Broken in derived type:
type t_ctl
character(len=16) :: tdefi(2) = (/'0z1jan0000','1hr '/)
! 1234567890
end type t_ctl
See the attached program for details.
--
Summary: Character array initialization in derived type: bad zero
padding
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31487
More information about the Gcc-bugs
mailing list