public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0
@ 2004-04-29 18:01 gcc-bugzilla at gcc dot gnu dot org
  2004-04-29 18:22 ` [Bug fortran/15206] [gfortran] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-04-29 18:01 UTC (permalink / raw)
  To: gcc-bugs


Consider the following program:
  !
  ! Test program for the RRSPACING() intrinsic.
  !
  ! RRSPACING(X) returns a real with same kind type as X whose value is the
  ! reciprocal of the relative spacing of the model numbers near X.
  !
  ! REAL model: $X = S B^E \sum_{k=1}^P F_k B^{-k}$
  !
  ! It returns $|X B^{-E}| B^P$.
  !
  program test_rrspacing

  implicit none

  real(4) s
  real(4) d
  s = 0.e0_sp
  d = 0.e0_dp
  write(*,1) 'rrspacing(', s, ') = ', rrspacing(s)
  write(*,2) 'rrspacing(', d, ') = ', rrspacing(d)
1 format(a,e8.2,a,e15.7)
2 format(a,e8.2,a,e23.15)

  end program test_rrspacing.

Gfortran produces

kargl[206] ./rrspacing 
rrspacing(0.00E+00) =   0.8388608E+07
rrspacing(0.00E+00) =   0.450359962737049E+16

which the return value of $|X B^{-E}| B^P$.


Note NAG's compiler gives
kargl[209] ./a
rrspacing(0.00E+00) =  -0.0000000E+00
rrspacing(0.00E+00) =  -0.000000000000000E+00

Environment:
System: FreeBSD c-67-168-59-70.client.comcast.net 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sat Apr 24 10:33:08 PDT 2004 kargl@c-67-168-59-70.client.comcast.net:/usr/obj/usr/src/sys/HOTRATS i386


	
host: i386-unknown-freebsd5.2
build: i386-unknown-freebsd5.2
target: i386-unknown-freebsd5.2
configured with: ../gcc/configure --prefix=/home/kargl/gcc/work --disable-libmudflap --enable-languages=c,f95 --with-gmp=/usr/local

How-To-Repeat:
	See above

-- 
           Summary: RRSPACING intrinsics returns wrong result for 0.0
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kargl at c-67-168-59-70 dot client dot comcast dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.2
  GCC host triplet: i386-unknown-freebsd5.2
GCC target triplet: i386-unknown-freebsd5.2


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
@ 2004-04-29 18:22 ` pinskia at gcc dot gnu dot org
  2004-04-29 18:25 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-29 18:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|RRSPACING intrinsics returns|[gfortran] RRSPACING
                   |wrong result for 0.0        |intrinsics returns wrong
                   |                            |result for 0.0
   Target Milestone|---                         |tree-ssa
            Version|unknown                     |tree-ssa


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
  2004-04-29 18:22 ` [Bug fortran/15206] [gfortran] " pinskia at gcc dot gnu dot org
@ 2004-04-29 18:25 ` pinskia at gcc dot gnu dot org
  2004-05-03 23:21 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-29 18:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-29 18:10 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|i386-unknown-freebsd5.2     |
   GCC host triplet|i386-unknown-freebsd5.2     |
 GCC target triplet|i386-unknown-freebsd5.2     |
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-29 18:10:17
               date|                            |


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
  2004-04-29 18:22 ` [Bug fortran/15206] [gfortran] " pinskia at gcc dot gnu dot org
  2004-04-29 18:25 ` pinskia at gcc dot gnu dot org
@ 2004-05-03 23:21 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
  2004-05-04  0:51 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-05-03 23:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2004-05-03 23:21 -------
I have a patch for this. As usual, it's waiting for my copyright assignment. Can
you assign it to me, Steve? That way noone else will accidentally waste his time
on this, while I can't submit my patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Tobias dot Schlueter at
                   |                            |physik dot uni-muenchen dot
                   |                            |de


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-05-03 23:21 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2004-05-04  0:51 ` pinskia at gcc dot gnu dot org
  2004-05-08 18:24 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-04  0:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |Tobias dot Schlueter at
                   |dot org                     |physik dot uni-muenchen dot
                   |                            |de
             Status|NEW                         |ASSIGNED


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-05-04  0:51 ` pinskia at gcc dot gnu dot org
@ 2004-05-08 18:24 ` pinskia at gcc dot gnu dot org
  2004-05-14 20:13 ` cvs-commit at gcc dot gnu dot org
  2004-05-15  4:31 ` tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-08 18:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-08 18:24 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00468.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-05-08 18:24 ` pinskia at gcc dot gnu dot org
@ 2004-05-14 20:13 ` cvs-commit at gcc dot gnu dot org
  2004-05-15  4:31 ` tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-14 20:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-14 15:32 -------
Subject: Bug 15206

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-05-14 15:32:02

Modified files:
	gcc/fortran    : ChangeLog trans-intrinsic.c 

Log message:
	PR fortran/15206
	* trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
	handle zero correctly.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-intrinsic.c.diff?cvsroot=gcc&r1=1.4&r2=1.5



-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/15206] [gfortran] RRSPACING intrinsics returns wrong result for 0.0
  2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-05-14 20:13 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-15  4:31 ` tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-15  4:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-05-14 17:31 -------
Fixed by the above commit. Remaining issues with RRSPACING are PR 15441.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-05-14 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29 18:01 [Bug fortran/15206] New: RRSPACING intrinsics returns wrong result for 0.0 gcc-bugzilla at gcc dot gnu dot org
2004-04-29 18:22 ` [Bug fortran/15206] [gfortran] " pinskia at gcc dot gnu dot org
2004-04-29 18:25 ` pinskia at gcc dot gnu dot org
2004-05-03 23:21 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-04  0:51 ` pinskia at gcc dot gnu dot org
2004-05-08 18:24 ` pinskia at gcc dot gnu dot org
2004-05-14 20:13 ` cvs-commit at gcc dot gnu dot org
2004-05-15  4:31 ` tobi at gcc dot gnu dot org

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).