public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to.
@ 2004-09-23 15:36 eesrjhc at bath dot ac dot uk
  2004-09-23 16:39 ` [Bug libf2c/17636] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: eesrjhc at bath dot ac dot uk @ 2004-09-23 15:36 UTC (permalink / raw)
  To: gcc-bugs

$ uname -a
SunOS gilbert 5.8 Generic_108528-09 sun4u sparc SUNW,Sun-Blade-100
$ /usr/local/gcc-3.4.2/bin/g77 --version
GNU Fortran (GCC) 3.4.2
.
.

gcc was built with:

$ cd tmp/build
$ ../src/gcc-3.4.2/configure --prefix=/usr/local/gcc-3.4.2
--enable-languages=c,c++,f77 && make bootstrap

$ cat readfail.f
      program readfail
      character*30 str
      
      n=0
      open (10,file='READFAIL.IN')
 10   write(*,*)'Reading'
      read (10,'(A)',end=20,err=90)str
      n=n+1
      write(*,*)n
      goto 10
 20   continue
      write(*,*)'Writing'
      write(10,*)n+1
      write(*,*)'Closing'
      close(10)
      write(*,*)'Done'
      stop

 90   write(*,*) 'Error reading'
      stop
      end
$ cat READFAIL.IN 
1
2
$ /usr/local/gcc-3.4.2/bin/g77 -o readfail readfail.f
$ export LD_LIBRARY_PATH=/usr/local/gcc-3.4.2/lib/
$ ./readfail
 Reading
 1
 Reading
 2
 Reading
 Writing
 Closing
endfile: truncation failed in endfile
apparent state: unit 6 (unnamed)
last format: list io
lately writing sequential formatted external IO
Abort

This also happens with -m64 compile flag and using the sparcv9 64-bit libraries. 
The error does not occur on other architectures (at least
x86_64-unknown-linux-gnu and i686-pc-linux-gnu) all built with the same
configuration.

The same error occurs with GCC versions 3.1.1, 3.2.1, 3.2.3, 3.3.1, 3.3.3,
3.4.0, but NOT with 2.95.3.

-- 
           Summary: [Sparc g77] "truncation failed in endfile" error when
                    closing a file appended to.
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eesrjhc at bath dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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


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

* [Bug libf2c/17636] [3.3/3.4 Regression] [Sparc g77] "truncation failed in endfile" error when closing a file appended to.
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
@ 2004-09-23 16:39 ` pinskia at gcc dot gnu dot org
  2004-09-24  5:50 ` ebotcazou at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 16:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |libf2c
            Summary|[Sparc g77] "truncation     |[3.3/3.4 Regression] [Sparc
                   |failed in endfile" error    |g77] "truncation failed in
                   |when closing a file appended|endfile" error when closing
                   |to.                         |a file appended to.
   Target Milestone|---                         |3.4.3


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


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

* [Bug libf2c/17636] [3.3/3.4 Regression] [Sparc g77] "truncation failed in endfile" error when closing a file appended to.
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
  2004-09-23 16:39 ` [Bug libf2c/17636] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-24  5:50 ` ebotcazou at gcc dot gnu dot org
  2004-09-24 10:27 ` eesrjhc at bath dot ac dot uk
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-09-24  5:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


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


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

* [Bug libf2c/17636] [3.3/3.4 Regression] [Sparc g77] "truncation failed in endfile" error when closing a file appended to.
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
  2004-09-23 16:39 ` [Bug libf2c/17636] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
  2004-09-24  5:50 ` ebotcazou at gcc dot gnu dot org
@ 2004-09-24 10:27 ` eesrjhc at bath dot ac dot uk
  2004-10-01 15:20 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: eesrjhc at bath dot ac dot uk @ 2004-09-24 10:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From eesrjhc at bath dot ac dot uk  2004-09-24 10:27 -------
I'm sorry, but I forgot to mention: with g77 version 2.95.3 the error message
stated does not occurr; instead the file read and written to is silently
truncated to zero bytes.

-- 


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


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

* [Bug libf2c/17636] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (2 preceding siblings ...)
  2004-09-24 10:27 ` eesrjhc at bath dot ac dot uk
@ 2004-10-01 15:20 ` ebotcazou at gcc dot gnu dot org
  2004-10-01 15:22 ` [Bug libf2c/17636] [g77 only] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 15:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 15:20 -------
Confirmed with GCC 2.95.3, 3.3.x and 3.4.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |2.95.3 3.3.2 3.4.2 3.4.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-01 15:20:27
               date|                            |
            Summary|[3.3/3.4 Regression] [Sparc |"truncation failed in
                   |g77] "truncation failed in  |endfile" error when closing
                   |endfile" error when closing |a file appended to
                   |a file appended to.         |
   Target Milestone|3.4.3                       |---


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


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

* [Bug libf2c/17636] [g77 only] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (3 preceding siblings ...)
  2004-10-01 15:20 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
@ 2004-10-01 15:22 ` pinskia at gcc dot gnu dot org
  2004-10-01 15:36 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-01 15:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|"truncation failed in       |[g77 only] "truncation
                   |endfile" error when closing |failed in endfile" error
                   |a file appended to          |when closing a file appended
                   |                            |to
   Target Milestone|---                         |3.4.3


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


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

* [Bug libf2c/17636] [g77 only] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (4 preceding siblings ...)
  2004-10-01 15:22 ` [Bug libf2c/17636] [g77 only] " pinskia at gcc dot gnu dot org
@ 2004-10-01 15:36 ` ebotcazou at gcc dot gnu dot org
  2004-10-01 15:38 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 15:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 15:36 -------
I fail to see why you put back [g77 only]...this is a libf2c bug:

#0  0xff29fbe8 in _libc_kill () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff29fbe8 in _libc_kill () from /usr/lib/libc.so.1
#1  0xff23598c in abort () from /usr/lib/libc.so.1
#2  0xff367594 in sig_die (s=0xff37b440 " IO", kill=1)
    at /home/eric/cvs/gcc-3_4-branch/libf2c/libF77/sig_die.c:28
#3  0xff36b8fc in t_runc (a=0x20fc0)
    at /home/eric/cvs/gcc-3_4-branch/libf2c/libI77/endfile.c:128
#4  0xff36a4b0 in f_clos (a=0x20fc0)
    at /home/eric/cvs/gcc-3_4-branch/libf2c/libI77/close.c:44
#5  0x00010b28 in MAIN__ () at pr17236.f:15
#6  0x00010c00 in main (argc=1, argv=0xffbefc7c)
    at /opt/build/gcc-3.4.2/libf2c/libF77/main.c:28


-- 


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


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

* [Bug libf2c/17636] [g77 only] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (5 preceding siblings ...)
  2004-10-01 15:36 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-01 15:38 ` pinskia at gcc dot gnu dot org
  2004-10-01 16:17 ` ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-01 15:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-01 15:38 -------
Because it does not fail with gfortran which is also the reason why I put back the 3.4.3 target milestone. 
libf2c is not used for gfortran at all.

-- 


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


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

* [Bug libf2c/17636] [g77 only] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (6 preceding siblings ...)
  2004-10-01 15:38 ` pinskia at gcc dot gnu dot org
@ 2004-10-01 16:17 ` ebotcazou at gcc dot gnu dot org
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 16:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 16:17 -------
> Because it does not fail with gfortran which is also the reason why I put back 
> the 3.4.3 target milestone. libf2c is not used for gfortran at all.

Why do you need to tag a libf2c failure with [g77 only], given that libf2c is
used with g77 only?  The component is not fortran here.


-- 


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


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

* [Bug libf2c/17636] [g77 only] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (7 preceding siblings ...)
  2004-10-01 16:17 ` ebotcazou at gcc dot gnu dot org
@ 2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
  2004-12-17 11:05 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:46 -------
Postponed until GCC 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.3                       |3.4.4


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


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

* [Bug libf2c/17636] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (8 preceding siblings ...)
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
@ 2004-12-17 11:05 ` ebotcazou at gcc dot gnu dot org
  2004-12-17 18:14 ` ebotcazou at gcc dot gnu dot org
  2005-01-05  7:06 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-17 11:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-12-17 11:05 -------
Fixing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ebotcazou at gcc dot gnu dot|
                   |org                         |
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
            Summary|[g77 only] "truncation      |"truncation failed in
                   |failed in endfile" error    |endfile" error when closing
                   |when closing a file appended|a file appended to
                   |to                          |


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


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

* [Bug libf2c/17636] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (9 preceding siblings ...)
  2004-12-17 11:05 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
@ 2004-12-17 18:14 ` ebotcazou at gcc dot gnu dot org
  2005-01-05  7:06 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-17 18:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-12-17 18:14 -------
Patch at http://gcc.gnu.org/ml/fortran/2004-12/msg00177.html


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug libf2c/17636] "truncation failed in endfile" error when closing a file appended to
  2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
                   ` (10 preceding siblings ...)
  2004-12-17 18:14 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-05  7:06 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-05  7:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-01-05 07:06 -------
http://gcc.gnu.org/ml/gcc-cvs/2005-01/msg00140.html


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-01-05  7:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 15:36 [Bug fortran/17636] New: [Sparc g77] "truncation failed in endfile" error when closing a file appended to eesrjhc at bath dot ac dot uk
2004-09-23 16:39 ` [Bug libf2c/17636] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2004-09-24  5:50 ` ebotcazou at gcc dot gnu dot org
2004-09-24 10:27 ` eesrjhc at bath dot ac dot uk
2004-10-01 15:20 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
2004-10-01 15:22 ` [Bug libf2c/17636] [g77 only] " pinskia at gcc dot gnu dot org
2004-10-01 15:36 ` ebotcazou at gcc dot gnu dot org
2004-10-01 15:38 ` pinskia at gcc dot gnu dot org
2004-10-01 16:17 ` ebotcazou at gcc dot gnu dot org
2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
2004-12-17 11:05 ` [Bug libf2c/17636] " ebotcazou at gcc dot gnu dot org
2004-12-17 18:14 ` ebotcazou at gcc dot gnu dot org
2005-01-05  7:06 ` ebotcazou 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).