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/30200] New: valgrind errors for write statement


vondele@pcihopt1:/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2> gfortran
test.f90
vondele@pcihopt1:/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2> ./a.out
 avondele@pcihopt1:/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2> valgrind
--tool=memcheck ./a.out
==16188== Memcheck, a memory error detector.
==16188== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==16188== Using LibVEX rev 1575, a library for dynamic binary translation.
==16188== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==16188== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==16188== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==16188== For more details, rerun with: -v
==16188==
==16188== Invalid read of size 1
==16188==    at 0x4B93D8D: formatted_transfer_scalar (transfer.c:834)
==16188==    by 0x4B94182: formatted_transfer (transfer.c:1355)
==16188==    by 0x400CF2: MAIN__ (in
/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2/a.out)
==16188==    by 0x400D2D: main (fmain.c:18)
==16188==  Address 0x5148646 is 6 bytes inside a block of size 10 free'd
==16188==    at 0x4A1984D: free (vg_replace_malloc.c:235)
==16188==    by 0x400CC6: MAIN__ (in
/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2/a.out)
==16188==    by 0x400D2D: main (fmain.c:18)
==16188==
==16188== Invalid read of size 1
==16188==    at 0x4B93DA9: formatted_transfer_scalar (transfer.c:838)
==16188==    by 0x4B94182: formatted_transfer (transfer.c:1355)
==16188==    by 0x400CF2: MAIN__ (in
/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2/a.out)
==16188==    by 0x400D2D: main (fmain.c:18)
==16188==  Address 0x5148647 is 7 bytes inside a block of size 10 free'd
==16188==    at 0x4A1984D: free (vg_replace_malloc.c:235)
==16188==    by 0x400CC6: MAIN__ (in
/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2/a.out)
==16188==    by 0x400D2D: main (fmain.c:18)
 a ==16188==
==16188== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 3 from 2)
==16188== malloc/free: in use at exit: 0 bytes in 0 blocks.
==16188== malloc/free: 11 allocs, 11 frees, 29,400 bytes allocated.
==16188== For counts of detected errors, rerun with: -v
==16188== All heap blocks were freed -- no leaks are possible.
vondele@pcihopt1:/scratch/vondele/clean/cp2k/tests/QS/regtest-gpw-2> cat
test.f90
   character(len=100) myfmt
   type test
    character(len=100) :: names(5)
   end type test
   type(test) :: keyword
   keyword%names=(/"a","b","c","d","e"/)
   myfmt="1X"
   WRITE(unit=6,fmt="("//TRIM(myfmt)//",a,' ')",advance="NO")
TRIM(keyword%names(1))
   END


-- 
           Summary: valgrind errors for write statement
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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