From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26539 invoked by alias); 18 Sep 2006 19:29:37 -0000 Received: (qmail 26501 invoked by uid 48); 18 Sep 2006 19:29:30 -0000 Date: Mon, 18 Sep 2006 19:29:00 -0000 Message-ID: <20060918192930.26500.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29101] Memory leak in gfortran In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg01739.txt.bz2 List-Id: ------- Comment #5 from pault at gcc dot gnu dot org 2006-09-18 19:29 ------- Thanks Steven, it was just too obvious, wasn't it? Index: gcc/fortran/trans-stmt.c =================================================================== --- gcc/fortran/trans-stmt.c (revision 117030) +++ gcc/fortran/trans-stmt.c (working copy) @@ -1475,6 +1475,8 @@ if (n != 0) gfc_free (labels); + gfc_add_block_to_block (&block, &se.post); + return gfc_finish_block (&block); now gives pstr.6 = (char[1:D.960] *) _gfortran_internal_malloc (D.960); tolower (pstr.6, D.960, D.958, D.959); goto _gfortran_select_string ((void *) &jumptable.5, 2, &L.5, pstr.6, D.960); L.4:; *value = 1; goto L.5; L.3:; __result_validate_value = 0; goto L.5; L.5:; _gfortran_internal_free ((void *) pstr.6); -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stevenb dot gcc at gmail dot | |com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29101