public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/31052] Bad IOSTAT values when readings NAMELISTs past EOF
Date: Tue, 20 Mar 2007 08:51:00 -0000	[thread overview]
Message-ID: <20070320085114.14626.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31052-6318@http.gcc.gnu.org/bugzilla/>



------- Comment #23 from anlauf at gmx dot de  2007-03-20 08:51 -------
(In reply to comment #22)
> Error 5001 would be ERROR_OPTION_CONFLICT.  There are 18 different errors
> associated with that code.  To find out which one, you must remove the iostat
> from the offending line so that gfortran will print the error message for you.

OK, this is what I get with iostat removed and compiled with -fbacktrace:

At line 264 of file ../../../../oo-model/mo_thinning.f90
Fortran runtime error: Missing format for FORMATTED data transfer

Backtrace for this error:
  + function data_transfer_init (0x89C9B92)
    at line 1806 of file transfer.c
  + function __mo_thinning__read_nml_thin (0x83570AC)
    at line 264 of file mo_thinning.f90
[...]

The code in question does a:
    rewind (nnml)
[...]
    call position_nml (nnml, 'THINNING', ...)
[...]
    read (nnml, nml=THINNING)     ! This is line 264

The read is only executed when the position_nml succeeds.

> Another option is to use iomsg and get the string.

Thanks, I did not know this F2003 feature.  In that case I get for

          iomsg = ""
          read (nnml, nml=THINNING, iostat=ios, iomsg=iomsg)

the following output:

 iostat =        5001
 iomsg  = Missing format for FORMATTED data transfer                            

No crash, of course, at least in the read statement.

> You can access the code base at gcc.gnu.org/viewcvs or better,

I will bookmark that.

> download with
> anonymous svn.  See instructions here: http://gcc.gnu.org/svn.html.  If you do
> the svn approach, its very simple to get latest update and you are a few
> keystrokes from building it yourself. :)

My next computer and internet connection will probably be
powerful enough. ;-)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31052


  parent reply	other threads:[~2007-03-20  8:51 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05 22:24 [Bug libfortran/31052] New: " anlauf at gmx dot de
2007-03-05 22:26 ` [Bug libfortran/31052] " anlauf at gmx dot de
2007-03-05 23:27 ` kargl at gcc dot gnu dot org
2007-03-06  8:20 ` anlauf at gmx dot de
2007-03-06  8:42 ` anlauf at gmx dot de
2007-03-06 10:22 ` anlauf at gmx dot de
2007-03-06 15:53 ` sgk at troutmask dot apl dot washington dot edu
2007-03-06 21:51 ` anlauf at gmx dot de
2007-03-06 21:52 ` anlauf at gmx dot de
2007-03-06 22:00 ` anlauf at gmx dot de
2007-03-07  3:37 ` jvdelisle at gcc dot gnu dot org
2007-03-07  3:38 ` jvdelisle at gcc dot gnu dot org
2007-03-07  4:46 ` jvdelisle at gcc dot gnu dot org
2007-03-07  6:41 ` jvdelisle at gcc dot gnu dot org
2007-03-08  5:52 ` jvdelisle at gcc dot gnu dot org
2007-03-08  8:24 ` anlauf at gmx dot de
2007-03-09  7:37 ` jvdelisle at gcc dot gnu dot org
2007-03-14  3:45 ` patchapp at dberlin dot org
2007-03-18 18:14 ` jvdelisle at gcc dot gnu dot org
2007-03-18 18:17 ` jvdelisle at gcc dot gnu dot org
2007-03-19 22:59 ` anlauf at gmx dot de
2007-03-20  1:47 ` sgk at troutmask dot apl dot washington dot edu
2007-03-20  2:20 ` jvdelisle at gcc dot gnu dot org
2007-03-20  8:51 ` anlauf at gmx dot de [this message]
2007-03-22 13:54 ` jv244 at cam dot ac dot uk
2007-03-22 20:38 ` jvdelisle at gcc dot gnu dot org
2007-03-23  0:13 ` jvdelisle at gcc dot gnu dot org
2007-03-23 22:39 ` anlauf at gmx dot de
2007-03-23 22:40 ` anlauf at gmx dot de
2007-03-23 22:43 ` anlauf at gmx dot de
2007-03-24 19:02 ` jvdelisle at verizon dot net
2007-03-26  6:01 ` jvdelisle at gcc dot gnu dot org
2007-03-26 12:15 ` jv244 at cam dot ac dot uk
2007-03-26 15:54 ` spark at gcc dot gnu dot org
2007-03-26 20:55 ` jvdelisle at gcc dot gnu dot org
2007-03-28  0:20 ` jvdelisle at gcc dot gnu dot org
2007-03-28  0:59 ` jvdelisle at gcc dot gnu dot org
2007-03-28 21:22 ` anlauf at gmx dot de
2007-04-01 16:01 ` patchapp at dberlin dot org
2007-04-01 17:32 ` jvdelisle at gcc dot gnu dot org
2007-04-01 17:33 ` jvdelisle at gcc dot gnu dot org
2007-04-02  7:42 ` [Bug libfortran/31052] [4.2 only] " anlauf at gmx dot de
2007-04-02 13:35 ` jvdelisle at gcc dot gnu dot org
2007-04-10 20:40 ` anlauf at gmx dot de
2007-04-13  4:28 ` hjl at lucon dot org
2007-04-13  4:32 ` pinskia at gcc dot gnu dot org
2007-04-13  7:05   ` Jerry DeLisle
2007-04-13  7:05 ` jvdelisle at verizon dot net
2007-04-13 16:16 ` hjl at lucon dot org
2007-04-14 19:19 ` jvdelisle at gcc dot gnu dot org
2007-04-14 21:09 ` hjl at lucon dot org
2007-04-15  1:55 ` jvdelisle at gcc dot gnu dot org
2007-04-28  4:19 ` kargl at gcc dot gnu dot org
2007-05-20 22:51 ` jvdelisle at gcc dot gnu dot org
2007-05-26  3:14 ` pinskia 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=20070320085114.14626.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: 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).