From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8736 invoked by alias); 4 Dec 2008 03:05:31 -0000 Received: (qmail 8224 invoked by uid 48); 4 Dec 2008 03:04:09 -0000 Date: Thu, 04 Dec 2008 03:05:00 -0000 Message-ID: <20081204030409.8223.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/33595] FAIL: gfortran.dg/nint_2.f90 -O0 execution test In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "billingd at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg00357.txt.bz2 ------- 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