https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38319

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
class_array_15.f03 leaks from line 65-66:
  allocate (indv(2), source = [individual(1, [99,999]), &
                               individual(2, [999,9999])])


==22496== HEAP SUMMARY:
==22496==     in use at exit: 32 bytes in 4 blocks
==22496==   total heap usage: 31 allocs, 27 frees, 12,096 bytes allocated
==22496== 
==22496== 8 bytes in 1 blocks are definitely lost in loss record 1 of 3
==22496==    at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22496==    by 0x403582: pr53876_ (class_array_15.f03:66)
==22496==    by 0x403D83: MAIN__ (class_array_15.f03:53)
==22496==    by 0x403DC4: main (class_array_15.f03:56)
==22496== 
==22496== 8 bytes in 1 blocks are definitely lost in loss record 2 of 3
==22496==    at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22496==    by 0x40375C: pr53876_ (class_array_15.f03:66)
==22496==    by 0x403D83: MAIN__ (class_array_15.f03:53)
==22496==    by 0x403DC4: main (class_array_15.f03:56)
==22496== 
==22496== 16 bytes in 2 blocks are definitely lost in loss record 3 of 3
==22496==    at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22496==    by 0x4039AE: pr53876_ (class_array_15.f03:66)
==22496==    by 0x403D83: MAIN__ (class_array_15.f03:53)
==22496==    by 0x403DC4: main (class_array_15.f03:56)
==22496== 
==22496== LEAK SUMMARY:
==22496==    definitely lost: 32 bytes in 4 blocks
==22496==    indirectly lost: 0 bytes in 0 blocks
==22496==      possibly lost: 0 bytes in 0 blocks
==22496==    still reachable: 0 bytes in 0 blocks
==22496==         suppressed: 0 bytes in 0 blocks
==22496== 
==22496== For counts of detected and suppressed errors, rerun with: -v
==22496== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 2 from 2)

The coming patch for PR78293 halves this number. The remaining leaks are
associated with the temporaries associated with individual(1, [99,999]), where
the component 'genes' does not get deallocated.

Paul

Reply via email to