public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/59774] [Regression] Inconsistent rounding between -m32 and -m64
Date: Sun, 12 Jan 2014 01:48:00 -0000	[thread overview]
Message-ID: <bug-59774-4-8iOykjeeas@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59774-4@http.gcc.gnu.org/bugzilla/>

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Inconsistent rounding       |[Regression] Inconsistent
                   |between -m32 and -m64       |rounding between -m32 and
                   |                            |-m64

--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I think this gets back to:

http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=185433

Using:

 print "(ru,g11.2)", 99._8
 print "(ru,g11.2)", 99._4
end


Looking at the buffer in output_float we get:

$ gfc  -m32 pr59771.f90 
$ ./a.out 
buffer=+99900000000000000000000e+01<<<
   0.99E+02
buffer=+99.000000000000<<<
    10.    
$ gfc  -m64 pr59771.f90 
$ ./a.out 
buffer=+99900000000000000000000e+01<<<
   0.99E+02
buffer=+999000000000000e+01<<<
   0.99E+02

Notice the '.' in the buffer for kind=4 vs kind=8

I don't know all the reasons for the changes made, but think "." needs to get
stripped out before we ever get to output_float and the exponent needs to be
there.  I do recall the reason gfortran does its own rounding is because the C
implementations across platforms are not consistent.


  parent reply	other threads:[~2014-01-12  1:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12  0:56 [Bug libfortran/59774] New: " jvdelisle at gcc dot gnu.org
2014-01-12  1:36 ` [Bug libfortran/59774] " dominiq at lps dot ens.fr
2014-01-12  1:48 ` jvdelisle at gcc dot gnu.org [this message]
2014-01-12  2:07 ` [Bug libfortran/59774] [Regression] " jvdelisle at gcc dot gnu.org
2014-01-12  3:59 ` jvdelisle at gcc dot gnu.org
2014-01-12 15:06 ` dominiq at lps dot ens.fr
2014-01-12 15:35 ` dominiq at lps dot ens.fr
2014-01-12 16:15 ` dominiq at lps dot ens.fr
2014-01-12 16:25 ` dominiq at lps dot ens.fr
2014-01-14 22:29 ` dominiq at lps dot ens.fr
2014-01-15  5:26 ` jvdelisle at gcc dot gnu.org
2014-01-15 22:50 ` dominiq at lps dot ens.fr
2014-01-16  9:31 ` [Bug libfortran/59774] [4.8/4.9 Regression] " dominiq at lps dot ens.fr
2014-01-18 14:36 ` dominiq at lps dot ens.fr
2014-01-19 23:18 ` jvdelisle at gcc dot gnu.org
2014-01-19 23:21 ` jvdelisle at gcc dot gnu.org
2014-01-31 10:49 ` rguenth at gcc dot gnu.org
2014-02-11  9:28 ` [Bug libfortran/59774] [4.8 " dominiq at lps dot ens.fr
2014-02-15 15:49 ` jvdelisle at gcc dot gnu.org
2014-02-15 15:58 ` jvdelisle at gcc dot gnu.org
2014-02-15 16:55 ` jvdelisle at gcc dot gnu.org
2014-02-15 17:27 ` jvdelisle at gcc dot gnu.org

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-59774-4-8iOykjeeas@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: link
Be 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).