public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "thenlich at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/48787] New: Invalid UP rounding with F editing
Date: Wed, 27 Apr 2011 08:46:00 -0000	[thread overview]
Message-ID: <bug-48787-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: Invalid UP rounding with F editing
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: thenlich@users.sourceforge.net


When UP output rounding is in effect, the output of F editing is rounded
incorrectly. In the example, real numbers with an exact internal representation
(whole numbers) are rounded up to the next higher value.

program test_ruf
    print "(ru,f2.0)", 2.0_4 ! 3. expected 2.
    print "(ru,f2.0)", 2.0_8 ! 3. expected 2.
    print "(ru,f2.0)", 2.0_10 ! 3. expected 2.
    print "(ru,f2.0)", 2.0_16 ! 3. expected 2.
end program test_ruf

Tested with gcc-Version 4.7.0 20110424 (experimental) [trunk revision 172919]
(GCC) 

Fortran 2008:
When the I/O rounding mode is UP, the value resulting from conversion shall be
the smallest representable value that is greater than or equal to the original
value.


             reply	other threads:[~2011-04-27  8:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  8:46 thenlich at users dot sourceforge.net [this message]
2011-04-28  4:11 ` [Bug libfortran/48787] " jvdelisle at gcc dot gnu.org
2011-04-28  6:42 ` thenlich at users dot sourceforge.net
2011-04-29  6:05 ` jvdelisle at gcc dot gnu.org
2011-04-29  7:14 ` thenlich at users dot sourceforge.net
2011-04-29 15:55   ` Jerry DeLisle
2011-04-29 14:57 ` jvdelisle at gcc dot gnu.org
2011-04-29 15:15 ` jvdelisle at gcc dot gnu.org
2011-04-29 15:58 ` jvdelisle at frontier dot com
2011-04-30 12:00 ` thenlich at users dot sourceforge.net
2011-04-30 12:44 ` jvdelisle at gcc dot gnu.org
2011-04-30 15:58 ` thenlich at users dot sourceforge.net
2011-05-01 12:37 ` jvdelisle at gcc dot gnu.org
2011-05-01 12:56 ` jvdelisle at gcc dot gnu.org
2011-05-02  3:36 ` jvdelisle at gcc dot gnu.org
2011-05-02 13:35 ` thenlich at users dot sourceforge.net
2011-05-02 13:59 ` thenlich at users dot sourceforge.net
2011-05-02 19:08 ` jvdelisle at gcc dot gnu.org
2011-05-03 11:47 ` [Bug libfortran/48787] Invalid UP/DOWN " jvdelisle at gcc dot gnu.org
2011-05-04 16:59 ` jvdelisle at gcc dot gnu.org
2011-05-05  1:24 ` jvdelisle at gcc dot gnu.org
2011-05-05  1:31 ` jvdelisle at gcc dot gnu.org
2011-05-06 20:11 ` jvdelisle at gcc dot gnu.org
2011-06-17 13:23 ` thenlich at users dot sourceforge.net
2011-06-17 13:32 ` dominiq at lps dot ens.fr
2011-06-20  7:15 ` thenlich at users dot sourceforge.net
2011-06-21  2:52 ` jvdelisle at gcc dot gnu.org
2011-06-23  6:13 ` thenlich at users dot sourceforge.net
2011-06-27 23:27 ` jvdelisle at gcc dot gnu.org
2011-07-04 14:28 ` jvdelisle at gcc dot gnu.org
2014-01-18 17:46 ` dominiq at lps dot ens.fr

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-48787-4@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).