public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/37707] Namelist read of array of derived type incorrect Date: Sun, 19 Oct 2008 09:46:00 -0000 [thread overview] Message-ID: <20081019094439.11969.qmail@sourceware.org> (raw) In-Reply-To: <bug-37707-109@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1932 bytes --] ------- Comment #22 from burnus at gcc dot gnu dot org 2008-10-19 09:44 ------- (In reply to comment #19) > > Warning: CHARACTER expression at (1) is being truncated (222/200) > Tobias, you are right - the string is too short - 250 characters should do, > however, and I get the same error. > How did you provoke the warning (I certainly do not get it by default) ... Well, actually I saw it when I compiled the program with NAG f95 ("Initialisation expression for L truncated") which shows this message by default. gfortran shows it with -Wcharacter-truncation or with -Wall (which I used). [Contrary to NAG f95, gfortran shows the warning not only for initialization expressions.] (In reply to comment #21) > Toon and Tobias: Please try this attached patch. Looks OK. > The only thing I need to determine now is if there is a legacy behaviour we > may want to deal with Sunf95 and ifort seem to read -- without quotes -- all alphanumerical characters plus e.g. § until the next space/comma (and they treat %"'$ special-> ignore, end of string/namelist or as error). With NAG f95, g95, openf95, pathf95 and pgf95 one gets always an error message without quotes. With gfortran-4.3 "str=test /" does not work but "str=test,/" does. I think the patch by itself is OK but doing the same as ifort and sunf95 would be also OK. Interesting that this did not come up as issue before. Seemingly no one uses write(...,namelist) with characters (as almost all compiler get this wrong) and seemingly reading a list of characters is also not widely done. @@ -1453,7 +1453,7 @@ namelist_write (st_parameter_dt *dtp) break; default: - dtp->u.p.nml_delim = '\0'; + dtp->u.p.nml_delim = '"'; wouldn't it be easier/faster to simply remove the whole switch and use simply dtp->u.p.nml_delim = '"'; without special cases for the current delim status? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37707
next prev parent reply other threads:[~2008-10-19 9:46 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-01 21:01 [Bug libfortran/37707] New: " toon at moene dot indiv dot nluug dot nl 2008-10-01 21:43 ` [Bug libfortran/37707] " burnus at gcc dot gnu dot org 2008-10-02 1:48 ` jvdelisle at gcc dot gnu dot org 2008-10-09 2:41 ` jvdelisle at gcc dot gnu dot org 2008-10-09 4:05 ` jvdelisle at gcc dot gnu dot org 2008-10-09 4:17 ` jvdelisle at gcc dot gnu dot org 2008-10-09 9:16 ` pault at gcc dot gnu dot org 2008-10-09 9:28 ` dominiq at lps dot ens dot fr 2008-10-09 13:33 ` burnus at gcc dot gnu dot org 2008-10-10 2:12 ` jvdelisle at gcc dot gnu dot org 2008-10-10 2:15 ` jvdelisle at gcc dot gnu dot org 2008-10-18 5:26 ` jvdelisle at gcc dot gnu dot org 2008-10-18 5:37 ` jvdelisle at gcc dot gnu dot org 2008-10-18 8:44 ` toon at moene dot indiv dot nluug dot nl 2008-10-18 8:48 ` toon at moene dot indiv dot nluug dot nl 2008-10-18 8:48 ` toon at moene dot indiv dot nluug dot nl 2008-10-18 14:35 ` burnus at gcc dot gnu dot org 2008-10-18 14:54 ` burnus at gcc dot gnu dot org 2008-10-18 15:14 ` burnus at gcc dot gnu dot org 2008-10-18 15:34 ` toon at moene dot indiv dot nluug dot nl 2008-10-18 17:48 ` jvdelisle at gcc dot gnu dot org 2008-10-18 21:49 ` jvdelisle at gcc dot gnu dot org 2008-10-19 9:46 ` burnus at gcc dot gnu dot org [this message] 2008-10-19 15:31 ` jvdelisle at gcc dot gnu dot org 2008-10-19 15:33 ` jvdelisle at gcc dot gnu dot org 2008-10-19 15:41 ` jvdelisle at gcc dot gnu dot org 2008-10-19 16:12 ` toon at moene dot indiv dot nluug dot nl 2008-10-19 18:17 ` jvdelisle at gcc dot gnu dot org 2008-10-22 8:30 ` toon at moene dot indiv dot nluug dot nl 2008-10-23 2:33 ` jvdelisle at gcc dot gnu dot org 2008-10-23 2:45 ` jvdelisle at gcc dot gnu dot org 2008-10-23 2:51 ` jvdelisle at gcc dot gnu dot org 2008-10-23 6:20 ` burnus at gcc dot gnu dot org 2008-10-29 4:47 ` jvdelisle at gcc dot gnu dot org 2008-10-29 4:49 ` jvdelisle at gcc dot gnu dot org 2008-10-29 4:50 ` jvdelisle at gcc dot gnu dot 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=20081019094439.11969.qmail@sourceware.org \ --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: linkBe 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).