From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22795 invoked by alias); 17 Oct 2008 15:18:22 -0000 Received: (qmail 22431 invoked by uid 48); 17 Oct 2008 15:16:56 -0000 Date: Fri, 17 Oct 2008 15:18:00 -0000 Subject: [Bug fortran/37863] New: Display of a value close to 1 shows 2 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sylvestre dot ledru at inria dot fr" 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: 2008-10/txt/msg01155.txt.bz2 With the code here: ---- program pb character*10 form character*4093 str str=' ' write(form,120) 3,0 write(str(1:3),form) 1.0d0 - 1.110223024625157D-16 print *,str(1:10) 120 format('(f',i2,'.',i2,')') end ---- Compiled with gfortran 4.3.2: the output is 2 With the gfortran 4.2.4 the result is 1 (which is the right one) $ gfortran-4.3 -o pb pb.f && ./pb 2. $ gfortran-4.2 -o pb pb.f && ./pb 1. -- Summary: Display of a value close to 1 shows 2 Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: critical Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sylvestre dot ledru at inria dot fr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37863