public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43265]  New: Read no longer jumps on end
@ 2010-03-05  6:05 terry at chem dot gu dot se
  2010-03-05  9:08 ` [Bug fortran/43265] [4.3/4.4/4.5 Regression] No EOF condition if reading with '(x)' from an empty file burnus at gcc dot gnu dot org
                   ` (31 more replies)
  0 siblings, 32 replies; 33+ messages in thread
From: terry at chem dot gu dot se @ 2010-03-05  6:05 UTC (permalink / raw)
  To: gcc-bugs

In at least 4.4.2 and 4.4.3, a jump on read trick that worked in 4.2.4 and
4.3.4, and with ifort 10,11 and numerous others, no longer works.


[tjf@rscpc28 ReadTest]$ cat log
line 1
line 2
line 3
[tjf@rscpc28 ReadTest]$ cat fred.f90 
program fred
implicit none
integer::i
open(2,file='log')
do i=1,10
  read(2,'(1x)',end=12)
  write(*,*)i
enddo
12 if (i<11) write(*,*)'ended'
end
[tjf@rscpc28 ReadTest]$ gfortran -v -g -O0 -Wall -Wsurprising fred.f90
Driving: gfortran -v -g -O0 -Wall -Wsurprising fred.f90 -lgfortranbegin
-lgfortran -lm -shared-libgcc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.3/configure --disable-multilib
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.4.3 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-g' '-O0' '-Wall' '-Wsurprising' '-shared-libgcc'
'-mtune=generic'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.3/f951 fred.f90 -quiet -dumpbase
fred.f90 -mtune=generic -auxbase fred -g -O0 -Wall -Wsurprising -version
-fintrinsic-modules-path /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/finclude -o
/tmp/ccGHwQ2C.s
GNU Fortran (GCC) version 4.4.3 (i686-pc-linux-gnu)
        compiled by GNU C version 4.4.3, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '-g' '-O0' '-Wall' '-Wsurprising' '-shared-libgcc'
'-mtune=generic'
 as -V -Qy -o /tmp/ccys0PXc.o /tmp/ccGHwQ2C.s
GNU assembler version 2.18.0 (i486-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.18.0.20080103
COMPILER_PATH=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.3/:/usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.3/:/usr/local/libexec/gcc/i686-pc-linux-gnu/:/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/:/usr/local/lib/gcc/i686-pc-linux-gnu/
LIBRARY_PATH=/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/:/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-g' '-O0' '-Wall' '-Wsurprising' '-shared-libgcc'
'-mtune=generic'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.3/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/crtbegin.o
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/../../.. /tmp/ccys0PXc.o
-lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.3/crtend.o /usr/lib/crtn.o
[tjf@rscpc28 ReadTest]$ ./a.out 
           1
           2
           3
           4
           5
           6
           7
           8
           9
          10
[tjf@rscpc28 ReadTest]$ 


That should have stopped at 3.  When compiled with 4.2.4 I get:
[tjf@rscpc28 ReadTest]$ ./a.out 
           1
           2
           3
 ended
[tjf@rscpc28 ReadTest]$

as expected.

This is killing a large, multi-group quantum dynamics research code.


-- 
           Summary: Read no longer jumps on end
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: terry at chem dot gu dot se
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2010-03-30  3:57 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-05  6:05 [Bug fortran/43265] New: Read no longer jumps on end terry at chem dot gu dot se
2010-03-05  9:08 ` [Bug fortran/43265] [4.3/4.4/4.5 Regression] No EOF condition if reading with '(x)' from an empty file burnus at gcc dot gnu dot org
2010-03-05 17:02 ` hjl dot tools at gmail dot com
2010-03-05 18:08 ` burnus at gcc dot gnu dot org
2010-03-05 23:07 ` jvdelisle at gcc dot gnu dot org
2010-03-06  1:08 ` jvdelisle at gcc dot gnu dot org
2010-03-06  3:32 ` jvdelisle at gcc dot gnu dot org
2010-03-06  3:37 ` terry at chem dot gu dot se
2010-03-06  3:54 ` jvdelisle at gcc dot gnu dot org
2010-03-06  5:30 ` jvdelisle at gcc dot gnu dot org
2010-03-06  9:49 ` burnus at gcc dot gnu dot org
2010-03-08 20:20 ` jvdelisle at gcc dot gnu dot org
2010-03-09 14:41 ` jvdelisle at gcc dot gnu dot org
2010-03-09 15:36 ` burnus at gcc dot gnu dot org
2010-03-09 20:14 ` jvdelisle at gcc dot gnu dot org
2010-03-10 12:42 ` burnus at gcc dot gnu dot org
2010-03-10 16:27 ` rguenth at gcc dot gnu dot org
2010-03-11  2:27 ` jvdelisle at gcc dot gnu dot org
2010-03-12 14:33 ` jvdelisle at gcc dot gnu dot org
2010-03-12 14:36 ` jvdelisle at gcc dot gnu dot org
2010-03-18  2:38 ` jvdelisle at gcc dot gnu dot org
2010-03-18  2:43 ` jvdelisle at gcc dot gnu dot org
2010-03-18  2:52 ` jvdelisle at gcc dot gnu dot org
2010-03-18  2:54 ` jvdelisle at gcc dot gnu dot org
2010-03-18  3:52 ` jvdelisle at gcc dot gnu dot org
2010-03-18  3:56 ` jvdelisle at gcc dot gnu dot org
2010-03-18  3:58 ` jvdelisle at gcc dot gnu dot org
2010-03-29  2:50 ` jvdelisle at gcc dot gnu dot org
2010-03-30  3:22 ` jvdelisle at gcc dot gnu dot org
2010-03-30  3:25 ` jvdelisle at gcc dot gnu dot org
2010-03-30  3:54 ` jvdelisle at gcc dot gnu dot org
2010-03-30  3:56 ` jvdelisle at gcc dot gnu dot org
2010-03-30  3:57 ` 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).