public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "billingd at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/33595] FAIL: gfortran.dg/nint_2.f90  -O0  execution test
Date: Thu, 04 Dec 2008 03:05:00 -0000	[thread overview]
Message-ID: <20081204030409.8223.qmail@sourceware.org> (raw)
In-Reply-To: <bug-33595-276@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from billingd at gcc dot gnu dot org  2008-12-04 03:04 -------
Just had a look at this with cvs gfortran under cygwin.

A slightly modified test

program intrinsic_integer
  implicit none

  call test (0.0, (/0, 0, 0, 0/))
  call test (0.3, (/0, 1, 0, 0/))
  call test (0.7, (/0, 1, 0, 1/))
  call test (-0.3, (/-1, 0, 0, 0/))
  call test (-0.7, (/-1, 0, 0, -1/))
contains
subroutine test(val, res)
  real :: val
  integer, dimension(4) :: res

  if ((floor(val) .ne. res(1)) .or. (ceiling(val) .ne. res(2)) &
      .or. (int(val) .ne. res(3)) .or. (nint(val) .ne. res(4))) then
     write(6,'(a,f4.1,a,i2,a,i2)') 'nint(', val, ')=', nint(val), &
       ' require ', res(4)
  end if
end subroutine
end program

at -O0, -O1,  -O2 and -O3 gives

nint( 0.7)= 0 require  1                                                      
nint(-0.7)= 0 require -1

The C test program at #1, compiled with gcc-3.4.4 or CVS gcc 4.4.0 20081128
(experimental) [trunk revision 142255] gives "0 1 1" as expected.



-- 

billingd at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |billingd at gcc dot gnu dot
                   |                            |org


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


  parent reply	other threads:[~2008-12-04  3:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29 21:27 [Bug fortran/33595] New: " danglin at gcc dot gnu dot org
2007-10-01 13:13 ` [Bug fortran/33595] " fxcoudert at gcc dot gnu dot org
2007-10-01 16:33 ` dave at hiauly1 dot hia dot nrc dot ca
2007-10-01 16:39 ` fxcoudert at gcc dot gnu dot org
2007-10-01 17:29 ` dave at hiauly1 dot hia dot nrc dot ca
2007-12-22  7:38 ` jvdelisle at gcc dot gnu dot org
2008-12-04  3:05 ` billingd at gcc dot gnu dot org [this message]
2008-12-04  5:13 ` billingd at gcc dot gnu dot org
2008-12-28 20:26 ` danglin at gcc dot gnu dot org
2008-12-28 20:41 ` dave at hiauly1 dot hia dot nrc dot ca
2008-12-28 20:47 ` danglin at gcc dot gnu dot org
2008-12-28 21:03 ` kargl at gcc dot gnu dot org
2008-12-28 21:50 ` dave at hiauly1 dot hia dot nrc dot ca
2008-12-28 22:16 ` kargl at gcc dot gnu dot org
2008-12-29 17:12 ` danglin at gcc dot gnu dot org
2009-03-28  9:41 ` fxcoudert at gcc dot gnu dot org
2009-03-28 21:16 ` danglin at gcc dot gnu dot org
2009-03-29  7:36 ` [Bug libfortran/33595] " fxcoudert at gcc dot gnu dot 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=20081204030409.8223.qmail@sourceware.org \
    --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).