public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53521] New: Memory leak with zero sized array constructor
@ 2012-05-29 19:27 Joost.VandeVondele at mat dot ethz.ch
  2012-05-30  8:38 ` [Bug fortran/53521] [4.3/4.4/4.5/4.6/4.7/4.8 Regression] Zero-byte memory leak with zero-sized " burnus at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-05-29 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53521
           Summary: Memory leak with zero sized array constructor
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@mat.ethz.ch


The following testcase (as reduced from CP2K) leaks memory when compiled with
gfortran 4.6 - 4.8 :

MODULE TEST
 IMPLICIT NONE
CONTAINS
 SUBROUTINE T(n1)
  INTEGER :: n1(:)
 END SUBROUTINE T
 SUBROUTINE T2(n)
   INTEGER :: n
   INTEGER :: k
   CALL T((/(k,k=1,n-1)/))
 END SUBROUTINE
END MODULE
USE TEST
  CALL T2(1)
END 

as can be verified with valgrind or putting a loop around call t2. The issue
seems to be the zero-sized array constructor.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-02-27 12:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 19:27 [Bug fortran/53521] New: Memory leak with zero sized array constructor Joost.VandeVondele at mat dot ethz.ch
2012-05-30  8:38 ` [Bug fortran/53521] [4.3/4.4/4.5/4.6/4.7/4.8 Regression] Zero-byte memory leak with zero-sized " burnus at gcc dot gnu.org
2012-05-30  9:56 ` [Bug fortran/53521] [4.5/4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2012-05-30 12:32 ` [Bug fortran/53521] [4.5/4.6/4.7/4.8 Regression] Zero-byte "memory leak" with zero-sized array constructor (valgrind warning) Joost.VandeVondele at mat dot ethz.ch
2012-05-30 12:49 ` rguenth at gcc dot gnu.org
2012-05-30 14:37 ` jakub at gcc dot gnu.org
2012-05-30 14:38 ` Joost.VandeVondele at mat dot ethz.ch
2012-05-31  8:16 ` [Bug fortran/53521] [4.5/4.6/4.7/4.8 Regression] Memory leak with zero-sized array constructor burnus at gcc dot gnu.org
2012-05-31  8:44 ` jakub at gcc dot gnu.org
2012-05-31 14:29 ` burnus at gcc dot gnu.org
2012-06-01  7:43 ` [Bug fortran/53521] [4.5/4.6/4.7 " Joost.VandeVondele at mat dot ethz.ch
2012-06-01 15:08 ` burnus at gcc dot gnu.org
2012-06-01 20:07 ` burnus at gcc dot gnu.org
2012-06-01 20:41 ` burnus at gcc dot gnu.org
2012-06-01 21:08 ` [Bug fortran/53521] [4.5/4.6/4.7/4.8 " burnus at gcc dot gnu.org
2013-02-27 12:45 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).