From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29761 invoked by alias); 5 Jul 2009 02:12:18 -0000 Received: (qmail 29725 invoked by uid 48); 5 Jul 2009 02:12:03 -0000 Date: Sun, 05 Jul 2009 02:12:00 -0000 Message-ID: <20090705021203.29724.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/40330] [4.5 Regression] incorrect IO In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00381.txt.bz2 ------- Comment #32 from jvdelisle at gcc dot gnu dot org 2009-07-05 02:12 ------- I am getting close now. I have a patch that actually passes the CP2K test case and regression testing. It turns out that the parse_format_list function is called recursively so one must be careful about relaying information back up to the callers that a FMT_STRING token is involved and so don't save the parsed data. There is a memory leak remaining, but I know exactly what it is and what to do about it. The patch I am working on is really just a work around for the real problem. The real problem is that the pointer for literal strings in formats is clobbered by the routine that writes it. My plan is to get the above mentioned workaround patch finalized and then work toward eliminating this root problem in a subsequent patch. The final fix will involve some re-constructive surgery on the format node structure. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40330