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

            Bug ID: 121972
           Summary: [PDT] pdt_3.f03 leaks memory
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pault at gcc dot gnu.org
  Target Milestone: ---

==1367152== Memcheck, a memory error detector
==1367152== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==1367152== Using Valgrind-3.25.1 and LibVEX; rerun with -h for copyright info
==1367152== Command: ./a.out
==1367152== 
==1367152== 
==1367152== HEAP SUMMARY:
==1367152==     in use at exit: 128 bytes in 2 blocks
==1367152==   total heap usage: 32 allocs, 30 frees, 1,317,852 bytes allocated
==1367152== 
==1367152== 64 bytes in 1 blocks are definitely lost in loss record 1 of 2
==1367152==    at 0x483EB26: malloc (vg_replace_malloc.c:446)
==1367152==    by 0x401196: MAIN__ (pdt_3.f03:57)
==1367152==    by 0x402157: main (pdt_3.f03:11)

57  matrix = w%d ! leak goes away if 'matrix' deallocated at end of program.

==1367152== 
==1367152== 64 bytes in 1 blocks are definitely lost in loss record 2 of 2
==1367152==    at 0x483EB26: malloc (vg_replace_malloc.c:446)
==1367152==    by 0x401344: MAIN__ (pdt_3.f03:60)
==1367152==    by 0x402157: main (pdt_3.f03:11)

60  allocate (cz, source = mytype(ftype, d_dim)( 0, matrix))

==1367152== 
==1367152== LEAK SUMMARY:
==1367152==    definitely lost: 128 bytes in 2 blocks
==1367152==    indirectly lost: 0 bytes in 0 blocks
==1367152==      possibly lost: 0 bytes in 0 blocks
==1367152==    still reachable: 0 bytes in 0 blocks
==1367152==         suppressed: 0 bytes in 0 blocks
==1367152== 
==1367152== For lists of detected and suppressed errors, rerun with: -s
==1367152== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

Reply via email to