From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14760 invoked by alias); 10 May 2007 00:02:16 -0000 Received: (qmail 14673 invoked by uid 48); 10 May 2007 00:02:04 -0000 Date: Thu, 10 May 2007 00:02:00 -0000 Message-ID: <20070510000204.14672.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/31880] silent data corruption in gfortran read statement In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "roconnor2 at tampabay dot rr dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg00725.txt.bz2 ------- Comment #3 from roconnor2 at tampabay dot rr dot com 2007-05-10 01:02 ------- (In reply to comment #2) > (In reply to comment #1) > > Confirmed on i686-linux, for all active branches. > > > > I'm not sure how you can confirm this. The program is invalid. > a,b,c, and e are undefined in the write statement, so gfortran > can do whateve it wants. > This also exhibits the bug: program r3 integer*4 a(1025),b(1025),c(1025),d(2048),e(1022) a = 0 b = 0 c = 0 e = 0 do i=1,2048 d(i)=i end do open (3,file='a',form='unformatted') write (3) a,b,c,d,e rewind 3 read (3) a,b,c,d close (3) print *,d(1) end -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31880