From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21045 invoked by alias); 21 Jun 2007 03:27:50 -0000 Received: (qmail 20967 invoked by uid 48); 21 Jun 2007 03:27:41 -0000 Date: Thu, 21 Jun 2007 03:27:00 -0000 Message-ID: <20070621032741.20966.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32391] Wrong code with optimization on i686-pc-linux-gnu In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sunjoong at gmail 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-06/txt/msg01840.txt.bz2 ------- Comment #18 from sunjoong at gmail dot com 2007-06-21 03:27 ------- I appreciate kargl's comments; they were helpful. I had known there is VOLATILE attribute in new Fortran standard but I had worked with "LEGACY" fortran77 program! I'll write C code if I shuld write one; that is more compatable for me. However there are many legacy fortran 77 code in my field and I don't want to rewrite it. Small adjustment like '-ffloat-store' when compiling by gfortran instead of pgf77 is acceptable for I understood the behavior of register kargl told me. (I had read Goldberg's briefly but that is not point.) I had ONLY HOPEd VOLATILE statement in fortran 77 EXTENSION of gfortran. I thought that would be convenient on small modification of legacy fortran 77 program. (In reply to comment #17) > You need to update the Fortran Standard that you use. Fortran > 77 hasn't been the standard since about 1990. In fact, you're > 3 standard been! There was Fortran 90, which was replaced by > Fortran 95, which was replaced by Fortran 2003. Fortran 2003 > has the VOLATILE attribute and VOLATILE statement. Guess what?? > No, go ahead and guess! gfortran supports this feature. > > You need to go read Goldberg's paper about floating point arithmetic. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32391