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 fortran/43155] New: Reading real numbers of the form "123+ 44" (with space) Date: Tue, 23 Feb 2010 20:58:00 -0000 [thread overview] Message-ID: <bug-43155-13404@http.gcc.gnu.org/bugzilla/> (raw) The following program runs with ifort, sunf95, and pathscale, but it fails with gfortran, NAG f95 and g95. I think the number is not standard conform, but a "processor" is allowed to accept it. For "a" ifort et al. print "4380000.0". Additionally, I have the feeling that there is an off-by-one error in the error message; at least I expect "2" rather than "3" in the message. At line 4 of file test.f90 Fortran runtime error: Expected REAL for item 3 in formatted transfer, got INTEGER character(len=200) :: str real :: x str = ' 4.38000+ 6 2.55100+ 0 4.50000+ 6 2.51970+ 0 5.00000+ 6 2.40000+ 01146 3 1 171' read(str,'(6e11.0,i4,i2,i3,i5)') a,math,mfh,mth,nsp print *, a end -- Summary: Reading real numbers of the form "123+ 44" (with space) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43155
next reply other threads:[~2010-02-23 20:58 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-02-23 20:58 burnus at gcc dot gnu dot org [this message] 2010-02-23 21:28 ` [Bug fortran/43155] " kargl at gcc dot gnu dot org 2010-02-24 2:55 ` jvdelisle at gcc dot gnu dot org 2010-02-24 4:01 ` jvdelisle at gcc dot gnu dot org 2010-02-24 7:06 ` burnus at gcc dot gnu dot org 2010-02-25 5:52 ` jvdelisle at gcc dot gnu dot org 2010-02-27 19:26 ` [Bug fortran/43155] I/O error message: Off-by one position of edit descriptor burnus 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=bug-43155-13404@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: 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).