http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60913
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-04-21
CC| |tkoenig at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Valgrind shows:
ig25@linux-fd1f:~/Krempel/Leak> valgrind --leak-check=full ./a.out
==4355== Memcheck, a memory error detector
==4355== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==4355== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==4355== Command: ./a.out
==4355==
g: 2.3000E-01 4.6000E-01 6.9000E-01 9.2000E-01
g^-1: 3.2000E-01 6.4000E-01 9.6000E-01 1.2800E+00
gg^-1: -2.0608E+00 2.9440E-01 4.4160E-01 5.8880E-01
==4355==
==4355== HEAP SUMMARY:
==4355== in use at exit: 64,096 bytes in 2,003 blocks
==4355== total heap usage: 2,028 allocs, 25 frees, 83,275 bytes allocated
==4355==
==4355== 63,968 bytes in 1,999 blocks are definitely lost in loss record 5 of 5
==4355== at 0x4C277AB: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4355== by 0x401109: __group_su2_MOD_prodsu2 (foo.f90:202)
==4355== by 0x4017AE: MAIN__ (foo.f90:289)
==4355== by 0x401A0C: main (foo.f90:268)
==4355==
==4355== LEAK SUMMARY:
==4355== definitely lost: 63,968 bytes in 1,999 blocks
==4355== indirectly lost: 0 bytes in 0 blocks
==4355== possibly lost: 0 bytes in 0 blocks
==4355== still reachable: 128 bytes in 4 blocks
==4355== suppressed: 0 bytes in 0 blocks
==4355== Reachable blocks (those to which a pointer was found) are not shown.
==4355== To see them, rerun with: --leak-check=full --show-reachable=yes
==4355==
==4355== For counts of detected and suppressed errors, rerun with: -v
==4355== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
where line 202 is
Allocate(SU2::g3)
so the issue is with the allocatable function result of Prodsu2.