From patchwork Tue Nov 2 03:27:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerry DeLisle X-Patchwork-Id: 69860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1965C1007D2 for ; Tue, 2 Nov 2010 14:28:04 +1100 (EST) Received: (qmail 9708 invoked by alias); 2 Nov 2010 03:28:02 -0000 Received: (qmail 9690 invoked by uid 22791); 2 Nov 2010 03:28:01 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SARE_SUB_GETRID X-Spam-Check-By: sourceware.org Received: from out02.roch.ny.frontiernet.net (HELO out02.roch.ny.frontiernet.net) (66.133.183.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 03:27:57 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAFsiz0xHc96u/2dsb2JhbACDHp5HrW+RbIEigU+BYXMEhFc Received: from relay03.roch.ny.frontiernet.net ([66.133.182.166]) by out02.roch.ny.frontiernet.net with ESMTP; 02 Nov 2010 03:27:54 +0000 X-Previous-IP: 71.115.222.174 Received: from quava.localdomain (pool-71-115-222-174.spknwa.dsl-w.verizon.net [71.115.222.174]) by relay03.roch.ny.frontiernet.net (Postfix) with ESMTPA id 87E9910259; Tue, 2 Nov 2010 03:27:53 +0000 (UTC) Message-ID: <4CCF851C.3010301@frontier.com> Date: Mon, 01 Nov 2010 20:27:24 -0700 From: Jerry DeLisle User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4 MIME-Version: 1.0 To: Janne Blomqvist CC: Fortran List , GCC Patches Subject: Re: [Patch, libfortran] PR45629 Get rid of setjmp/longjmp in the IO library References: In-Reply-To: Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 11/01/2010 04:30 PM, Janne Blomqvist wrote: > Hi, > > the attached patch gets rid of the setjmp()/longjmp() based EOF > handling in list directed reads. It also fixes PR 45629. > > Tested on x86_64-unknown-linux-gnu, Ok for trunk? I understand stage > 1 just ended, and as EOF handling has been a rich source of tricky > bugs in the IO library, I'm perfectly Ok with postponing this until > 4.7. Overall I like the patch. I am concerned about the changes to st_parameter_dt. To be on the safe side I wonder if you should do something like this? (Maybe I worry too much. ;) ) Otherwise patch is OK. Jerry Index: io.h =================================================================== --- io.h (revision 164907) +++ io.h (working copy) @@ -435,7 +427,7 @@ typedef struct st_parameter_dt unsigned format_not_saved : 1; /* 14 unused bits. */ - char last_char; + char old_last_char; /* Remove when ABI breaks. */ char nml_delim; int repeat_count; @@ -446,7 +438,7 @@ typedef struct st_parameter_dt char *scratch; char *line_buffer; struct format_data *fmt; - jmp_buf *eof_jump; + jmp_buf *eof_jump; /* Remove when ABI breaks. */ namelist_info *ionml; /* A flag used to identify when a non-standard expanded namelist read has occurred. */ @@ -456,6 +448,7 @@ typedef struct st_parameter_dt largest kind. */ char value[32]; GFC_IO_INT size_used; + int last_char; } p; /* This pad size must be equal to the pad_size declared in trans-io.c (gfc_build_io_library_fndecls). The above structure