public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jvdelisle at charter dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/98825] Unexpected behavior of FORTRAN FORMAT expressions when suppressing new line with '$'
Date: Mon, 01 Feb 2021 02:37:03 +0000	[thread overview]
Message-ID: <bug-98825-4-a9royta7Ft@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98825-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98825

--- Comment #9 from Jerry DeLisle <jvdelisle at charter dot net> ---
The folowing patch fixes this and regression tests OK.

diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 8ab0583dd55..27bee9d4e01 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -4020,6 +4020,8 @@ next_record_w (st_parameter_dt *dtp, int done)
                }
            }
        }
+      else if (dtp->u.p.seen_dollar == 1)
+       break;
       /* Handle legacy CARRIAGECONTROL line endings.  */
       else if (dtp->u.p.current_unit->flags.cc == CC_FORTRAN)
        next_record_cc (dtp);

  parent reply	other threads:[~2021-02-01  2:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 16:51 [Bug libfortran/98825] New: " max.pd at gmx dot de
2021-01-25 18:09 ` [Bug libfortran/98825] " dominiq at lps dot ens.fr
2021-01-25 20:27 ` max.pd at gmx dot de
2021-01-25 23:59 ` max.pd at gmx dot de
2021-01-27  2:27 ` jvdelisle at charter dot net
2021-01-27 16:40 ` max.pd at gmx dot de
2021-01-30  4:30 ` jvdelisle at charter dot net
2021-01-31  3:02 ` max.pd at gmx dot de
2021-01-31  3:58 ` jvdelisle at charter dot net
2021-02-01  2:37 ` jvdelisle at charter dot net [this message]
2021-02-11  3:38 ` cvs-commit at gcc dot gnu.org
2021-02-13 21:42 ` jvdelisle at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98825-4-a9royta7Ft@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).