program x
  implicit none
  character(20) :: ch
  ch = ' '
  print '(a)', trim(ch)
end program x

valgrind:
==23260== Conditional jump or move depends on uninitialised value(s)
==23260==    at 0x4EBD506: formatted_transfer_scalar (transfer.c:888)
==23260==    by 0x4EBDFCC: formatted_transfer (transfer.c:1362)
==23260==    by 0x4009CE: MAIN__ (in /dev/shm/a.out)
==23260==    by 0x400A1B: main (fmain.c:22)


-- 
           Summary: Accessing uninitialized variable for print *,
                    trim(blank_string)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to