public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/26509]  New: incorrect behaviour of error-handler for internal read
@ 2006-03-01 12:36 kloedej at knmi dot nl
  2006-03-01 23:30 ` [Bug fortran/26509] " pault at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: kloedej at knmi dot nl @ 2006-03-01 12:36 UTC (permalink / raw)
  To: gcc-bugs

dear people,

the following test code gives some unexpected results:

program dummy
  character(len=100) :: a
  integer :: i,ios

  i=777
  a(:) = ' '
  read(a,*,err=999) i
  print *,"i=",i

  i=666
  read(a,*,iostat=ios) i
  print *,"i=",i
  IF (ios .ne. 0) print *,"read error: ios=",ios
  stop

999 print *,"read error occurred"

end program dummy

The test program should jump to label 999 as soon as the first read statement
fails. (or is this not part of the standard? seems unlikely, but I am no expert
on that).
However, the program stops with a runtime error.
The iostat error handler in the next read statement by the way does work
correct.

My screen output is: 
>gfortran -o dummy dummy.F90
>dummy
At line 7 of file dummy.F90
Fortran runtime error: End of file
>

The gfortran version used for testing was:
>gfortran -v
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure
--prefix=/cosmic/coudert/tmp/gfortran-20060301/irun
--enable-languages=c,fortran --host=i386-linux
--with-gmp=/cosmic/coudert/tmp/gfortran-20060301/gfortran_libs
Thread model: posix
gcc version 4.2.0 20060228 (experimental)
>

best regards,

Jos de Kloe


-- 
           Summary: incorrect behaviour of error-handler for internal read
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kloedej at knmi dot nl


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-03-23  6:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01 12:36 [Bug debug/26509] New: incorrect behaviour of error-handler for internal read kloedej at knmi dot nl
2006-03-01 23:30 ` [Bug fortran/26509] " pault at gcc dot gnu dot org
2006-03-02  3:58 ` jvdelisle at gcc dot gnu dot org
2006-03-03  0:37 ` jvdelisle at gcc dot gnu dot org
2006-03-05  3:07 ` jvdelisle at gcc dot gnu dot org
2006-03-05  3:17 ` jvdelisle at gcc dot gnu dot org
2006-03-05 18:01 ` kargl at gcc dot gnu dot org
2006-03-06 14:33 ` martin at mpa-garching dot mpg dot de
2006-03-07 16:30 ` dir at lanl dot gov
2006-03-08  1:13 ` jvdelisle at gcc dot gnu dot org
2006-03-08  1:16 ` jvdelisle at gcc dot gnu dot org
2006-03-09  6:39 ` jvdelisle at gcc dot gnu dot org
2006-03-09  7:12 ` martin at mpa-garching dot mpg dot de
2006-03-09 14:56 ` jvdelisle at gcc dot gnu dot org
2006-03-09 15:11 ` martin at mpa-garching dot mpg dot de
2006-03-10  8:27 ` kloedej at knmi dot nl
2006-03-13  4:22 ` jvdelisle at gcc dot gnu dot org
2006-03-13  4:35 ` patchapp at dberlin dot org
2006-03-13  4:36 ` [Bug fortran/26509] incorrect behaviour of error-handler for direct access write jvdelisle at gcc dot gnu dot org
2006-03-18  1:56 ` jvdelisle at gcc dot gnu dot org
2006-03-18  2:00 ` jvdelisle at gcc dot gnu dot org
2006-03-23  6:07 ` jvdelisle at gcc dot gnu dot org
2006-03-23  6:09 ` jvdelisle at gcc dot gnu dot org
2006-03-23  6:18 ` jvdelisle at gcc dot gnu dot org

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).