public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bechir dot zalila at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/38325] New: Long_Long_Float'Image returns a wrong value in some cases Date: Sun, 30 Nov 2008 10:04:00 -0000 [thread overview] Message-ID: <bug-38325-15454@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2008-11-30 10:04 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-30 10:04 bechir dot zalila at gmail dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-38325-15454@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).