Bug 20716 - Error gfortran and in "gfortran.fortran-torture/execute/backspace.f90"
Summary: Error gfortran and in "gfortran.fortran-torture/execute/backspace.f90"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 15:32 UTC by Dale Ranta
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin7.8.0
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Ranta 2005-04-01 15:32:18 UTC
The fortran testsuite routine 
"/gfortran/gcc/gcc/testsuite/gfortran.fortran-torture/execute/backspace.f90" is
actually incorrect - C should actually be 'a' not 'b' - gfortran incorrectly
returns 'b' and passes the bad test.


[dranta:~/tests/gfortran] dir% gfortran -o backspace backspace.f90
[dranta:~/tests/gfortran] dir% backspace
[dranta:~/tests/gfortran] dir% cat backspace.f90
! pr 15755
        implicit none
        character*1 C
        open(10)
        write(10,*)'a'
        write(10,*)'b'
        write(10,*)'c'
        rewind(10)
        read(10,*)C
        backspace(10) 
        read(10,*) C
        if (C.ne.'b') call abort
        close(10,STATUS='DELETE')
        end
Comment 1 Andrew Pinski 2005-04-01 15:34:09 UTC
This was just fixed by " François-Xavier Coudert":
        * gfortran.fortran-torture/execute/backspace.f90: Check
        after backspace and read was incorrect.