public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31487]  New: Character array initialization in derived type: bad zero padding
@ 2007-04-05 13:50 anlauf at gmx dot de
  2007-04-05 13:51 ` [Bug fortran/31487] " anlauf at gmx dot de
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: anlauf at gmx dot de @ 2007-04-05 13:50 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-12-09  9:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-05 13:50 [Bug fortran/31487] New: Character array initialization in derived type: bad zero padding anlauf at gmx dot de
2007-04-05 13:51 ` [Bug fortran/31487] " anlauf at gmx dot de
2007-04-08 10:41 ` fxcoudert at gcc dot gnu dot org
2007-04-16 14:37 ` tobi at gcc dot gnu dot org
2007-04-16 14:38 ` tobi at gcc dot gnu dot org
2007-04-17 15:12 ` tobi at gcc dot gnu dot org
2007-10-25  8:54 ` tobi at gcc dot gnu dot org
2007-12-07 18:37 ` pault at gcc dot gnu dot org
2007-12-07 23:05 ` dominiq at lps dot ens dot fr
2007-12-08  6:43 ` pault at gcc dot gnu dot org
2007-12-08  6:50 ` pault at gcc dot gnu dot org
2007-12-08 20:43 ` dominiq at lps dot ens dot fr
2007-12-09  9:17 ` pault at gcc dot gnu dot org
2007-12-09  9:19 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).