From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26181 invoked by alias); 22 Nov 2015 22:35:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26154 invoked by uid 89); 22 Nov 2015 22:35:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS,SUBJ_ALL_CAPS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mtaout002-public.msg.strl.va.charter.net Received: from mtaout002-public.msg.strl.va.charter.net (HELO mtaout002-public.msg.strl.va.charter.net) (68.114.190.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Nov 2015 22:35:05 +0000 Received: from impout003 ([68.114.189.18]) by mtaout002.msg.strl.va.charter.net (InterMail vM.9.00.021.00 201-2473-182) with ESMTP id <20151122223503.INPP13656.mtaout002.msg.strl.va.charter.net@impout003>; Sun, 22 Nov 2015 16:35:03 -0600 Received: from quattro.localdomain ([96.41.215.23]) by impout003 with charter.net id kmb21r00C0Wrkg001mb3M7; Sun, 22 Nov 2015 16:35:03 -0600 X-Authority-Analysis: v=2.1 cv=FYq5xfO6 c=1 sm=1 tr=0 a=salB9WdMPIDduBH7JsZfrA==:117 a=salB9WdMPIDduBH7JsZfrA==:17 a=hOpmn2quAAAA:8 a=r77TgQKjGQsHNAKrUKIA:9 a=mDV3o1hIAAAA:8 a=bTpFyWXTwyqt4bNVStoA:9 a=QEXdDO2ut3YA:10 a=3H1tBTX9PEYA:10 a=boFHUnB3OKViyJqyu6EA:9 a=cqXQWB9q-ue8USMMhMgA:9 a=dDqxxNA7QdgA:10 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 To: gfortran Cc: gcc patches From: Jerry DeLisle Subject: [PATCH] PR52251 X-Enigmail-Draft-Status: N1110 Message-ID: <56524315.5090305@charter.net> Date: Sun, 22 Nov 2015 22:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080902000603000701030702" X-SW-Source: 2015-11/txt/msg02630.txt.bz2 This is a multi-part message in MIME format. --------------080902000603000701030702 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 442 Another old patch I forgot about. This one is fairly self explanatory. We were not handling pending spaces for ADVANCE_NO and T editing. Regression tested x86-64-linux. New test case. OK for trunk? Jerry 2015-11-22 Jerry DeLisle PR libfortran/52251 * io/transfer.c (formatted_transfer_scalar_write): Reset skips count. (finalize_transfer): For ADVANCE_NO, emit pending spaces and reset the skip count. --------------080902000603000701030702 Content-Type: text/x-patch; name="tab.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tab.diff" Content-length: 939 --- transfer.c (revision 225410) +++ transfer.c (working copy) @@ -1641,6 +1641,7 @@ formatted_transfer_scalar_write (st_parameter_dt * - dtp->u.p.current_unit->bytes_left); dtp->u.p.max_pos = dtp->u.p.max_pos > tmp ? dtp->u.p.max_pos : tmp; + dtp->u.p.skips = 0; } if (dtp->u.p.skips < 0) { @@ -3600,6 +3601,16 @@ finalize_transfer (st_parameter_dt *dtp) next I/O operation if needed. */ if (dtp->u.p.advance_status == ADVANCE_NO) { + if (dtp->u.p.skips > 0) + { + int tmp; + write_x (dtp, dtp->u.p.skips, dtp->u.p.pending_spaces); + tmp = (int)(dtp->u.p.current_unit->recl + - dtp->u.p.current_unit->bytes_left); + dtp->u.p.max_pos = + dtp->u.p.max_pos > tmp ? dtp->u.p.max_pos : tmp; + dtp->u.p.skips = 0; + } int bytes_written = (int) (dtp->u.p.current_unit->recl - dtp->u.p.current_unit->bytes_left); dtp->u.p.current_unit->saved_pos = --------------080902000603000701030702 Content-Type: text/x-fortran; name="fmt_t_8.f90" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fmt_t_8.f90" Content-length: 179 ! { dg-do run } ! PR52251 Tabs with advance = 'no' write( *, '( t25 )', advance = 'no' ) write( *, '( "hello" )' ) ! { dg-output " hello(\n|\r\n|\r)" } end --------------080902000603000701030702--