From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4376 invoked by alias); 18 May 2014 02:31:00 -0000 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 Received: (qmail 4265 invoked by uid 55); 18 May 2014 02:30:49 -0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/52539] I/O: Wrong result for UTF-8/UCS-4 list-directed and namelist read and nml write Date: Sun, 18 May 2014 02:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg01525.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52539 --- Comment #27 from Jerry DeLisle --- Author: jvdelisle Date: Sun May 18 02:29:27 2014 New Revision: 210574 URL: http://gcc.gnu.org/viewcvs?rev=210574&root=gcc&view=rev Log: 2014-05-17 Jerry DeLisle PR libfortran/52539 * io/io.h (gfc_unit): New function pointers *next_char_fn_ptr and *push_char_fn_ptr. *io/list_read.c (next_char): Create macro with this name to call the new function pointer. Split the original next_char function into three new functions. (next_char_default, next_char_internal, next_char_utf8): New functions. (push_char): Create macro with this name to call new function pointer. Split the original push_char into three new functions. (push_char_default, push_char_internal, push_char4): New functions. (set_workers): New function to initilize the function pointers depending on the type of IO to be performed. (list_formatted_read_scalar): Use set_workers function. (finish_list_read): Likewise. (namelist_read): Likewise. (nml_get_obj_data): Use push_char_default. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/io.h trunk/libgfortran/io/list_read.c