==308946== Memcheck, a memory error detector ==308946== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==308946== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info ==308946== Command: ./test01 ==308946== ==308946== Invalid write of size 4 ==308946== at 0x109568: f_ (test01.f90:79) ==308946== by 0x1098B8: MAIN__ (test01.f90:33) ==308946== by 0x109A88: main (test01.f90:42) ==308946== Address 0x4edec48 is 0 bytes after a block of size 40 alloc'd ==308946== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==308946== by 0x109330: f_ (test01.f90:70) ==308946== by 0x1098B8: MAIN__ (test01.f90:33) ==308946== by 0x109A88: main (test01.f90:42) ==308946== ==308946== Invalid read of size 4 ==308946== at 0x4AFDF90: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0) ==308946== by 0x4AFF1B4: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0) ==308946== by 0x4AF86EB: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0) ==308946== by 0x4AF8E05: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0) ==308946== by 0x109608: f_ (test01.f90:80) ==308946== by 0x1098B8: MAIN__ (test01.f90:33) ==308946== by 0x109A88: main (test01.f90:42) ==308946== Address 0x4edec48 is 0 bytes after a block of size 40 alloc'd ==308946== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==308946== by 0x109330: f_ (test01.f90:70) ==308946== by 0x1098B8: MAIN__ (test01.f90:33) ==308946== by 0x109A88: main (test01.f90:42) ==308946== TEST01 FORTRAN90 version. A sample code for analysis by VALGRIND. 1 1 2 1 3 2 4 3 5 5 6 8 7 13 8 21 9 34 10 55 11 89 TEST01 Normal end of execution. ==308946== ==308946== HEAP SUMMARY: ==308946== in use at exit: 0 bytes in 0 blocks ==308946== total heap usage: 28 allocs, 28 frees, 38,378 bytes allocated ==308946== ==308946== All heap blocks were freed -- no leaks are possible ==308946== ==308946== For lists of detected and suppressed errors, rerun with: -s ==308946== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)