From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10693 invoked by alias); 31 Jan 2008 01:13:53 -0000 Received: (qmail 10558 invoked by uid 48); 31 Jan 2008 01:13:10 -0000 Date: Thu, 31 Jan 2008 02:01:00 -0000 Subject: [Bug fortran/35036] New: illegal E format descriptor produces wrong output X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "furue at hawaii dot edu" 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-01/txt/msg03722.txt.bz2 "E8.0" is an illegal format descriptor, but g77 produces a wrong output "0.1+01" for a value of 1e5, instead of a more sensible "********" . $ cat tmp.f a = 1.e5 write(*,'(E8.0)') a end $ g77 --version GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-6) [. . .] $ g77 tmp.f $ ./a.out 0.1+01 $ OK, since the format descriptor is illegal, g77 has the right to produce anything it likes, but producing a wrong output without warning is a poor handling of the error. Regards, Ryo -- Summary: illegal E format descriptor produces wrong output Product: gcc Version: 3.4.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: furue at hawaii dot edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35036