public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/38325]  New: Long_Long_Float'Image returns a wrong value in some cases
@ 2008-11-30 10:04 bechir dot zalila at gmail dot com
  2008-11-30 10:12 ` [Bug ada/38325] " schwab at suse dot de
  2008-11-30 10:28 ` bechir dot zalila at gmail dot com
  0 siblings, 2 replies; 4+ messages in thread
From: bechir dot zalila at gmail dot com @ 2008-11-30 10:04 UTC (permalink / raw)
  To: gcc-bugs

The test case below shows a bug in the Long_Long_Float'Image function on
FreeBSD 7:

File test_float.adb;
============

with Ada.Text_IO;              use Ada.Text_IO;

procedure Test_Float is
   L  : Long_Long_Float := 1.000;
   LL : Long_Long_Float := 10.000;
begin
   Put_Line (Long_Long_Float'Image (L/LL));
end Test_Float;

Expected execution result:
=================

10:25 ~/dev% ./test_float 
 1.00000000000000000E-01

Actual behavior with GNAT-GCC 4.3.2:
========================

10:26 ~/dev% ./test_float           
 1.00000000000000006E-01

(Note the trailing "6" after the zero's)

GNAT version:
=========

10:20 ~/dev% gnatls -v

GNATLS 4.3.2
Copyright (C) 1997-2007, Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   /opt/packages/gnat-4.3.2/lib/gcc/i686-portbld-freebsd7/4.3.2/adainclude/


Object Search Path:
   <Current_Directory>
   /opt/packages/gnat-4.3.2/lib/gcc/i686-portbld-freebsd7/4.3.2/adalib/


Project Search Path:
   <Current_Directory>
   /opt/packages/gnat-4.3.2/lib/gnat/

GCC version:
========

10:20 ~/dev% gcc -v
Using built-in specs.
Target: i686-portbld-freebsd7
Configured with: ../gcc-4.3.2/configure --prefix=/[snip]/gcc_4.3.2_install
--enable-languages=c,c++,ada --with-gmp=/[snip]/gmp_inst
--with-mpfr=/[snip]/mpfr_inst --disable-nls --host=i686-portbld-freebsd7
--target=i686-portbld-freebsd7 --build=i686-portbld-freebsd7
--enable-checking=release --enable-threads=posix
Thread model: posix
gcc version 4.3.2 (GCC)


-- 
           Summary: Long_Long_Float'Image returns a wrong value in some
                    cases
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bechir dot zalila at gmail dot com
 GCC build triplet: i686-portbld-freebsd7
  GCC host triplet: i686-portbld-freebsd7
GCC target triplet: i686-portbld-freebsd7


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38325


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-38325-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-04-28  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-30 10:04 [Bug ada/38325] New: Long_Long_Float'Image returns a wrong value in some cases bechir dot zalila at gmail dot com
2008-11-30 10:12 ` [Bug ada/38325] " schwab at suse dot de
2008-11-30 10:28 ` bechir dot zalila at gmail dot com
     [not found] <bug-38325-4@http.gcc.gnu.org/bugzilla/>
2021-04-28  8:44 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).