From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1086 invoked by alias); 29 Nov 2005 12:12:43 -0000 Received: (qmail 1072 invoked by uid 48); 29 Nov 2005 12:12:42 -0000 Date: Tue, 29 Nov 2005 12:12:00 -0000 Message-ID: <20051129121242.1071.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/25139] "Invalid argument" error on I/O In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-11/txt/msg03950.txt.bz2 List-Id: ------- Comment #2 from fxcoudert at gcc dot gnu dot org 2005-11-29 12:12 ------- Well, since it relies on uninitialized variables, it's a bit hard to reproduce. The following code (I believe it is legal) reproducibly fails for me on i686-linux: integer dat(5) dat = (/ 0, 0, 0, 0, 18651460 /) write(11) dat,dat,dat rewind 11 write(11) dat,dat,dat,dat rewind 11 write(11) dat rewind 11 write(11) dat rewind 11 read(11) dat read(11,end=1008) dat 1008 continue backspace 11 write(11) dat backspace 11 read(11) dat read(11,end=1011) dat 1011 continue backspace 11 backspace 11 end I think it has to do with array transfer, and overwriting the record markes with data. Adding Janne in CC list for opinion. -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jb at gcc dot gnu dot org, | |fxcoudert at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC host triplet|powerpc-apple-darwin8.3.0 | Last reconfirmed|0000-00-00 00:00:00 |2005-11-29 12:12:42 date| | Summary|Fortran runtime error: |"Invalid argument" error on |Invalid argument |I/O http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139