public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/15205] [gfortran] NEAREST intrinsic returns wrong value in DOUBLE PRECISION
Date: Fri, 30 Apr 2004 16:44:00 -0000 [thread overview]
Message-ID: <20040430163511.19471.qmail@sources.redhat.com> (raw)
In-Reply-To: <20040429173856.15205.kargl@c-67-168-59-70.client.comcast.net>
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-04-30 16:35 -------
(In reply to comment #2)
> for some reason i had to remove the _sp and _dp to get it to compile ?
>
> this is not a library problem, it is in the front end.
>
> [bdavis@localhost pr15205]$ gfortran -static a.f90
> [bdavis@localhost pr15205]$ nm a.out |grep near
> 527:08049140 T _gfortran_nearest_r4
>
> or look at the output of -fdump-tree-all
-fdump-parse-tree can be very helpful as well (after removing _sp and replacing
_dp by _8):
[tobi@marktplatz tests]$ gfortran pr15205.f90 -fdump-parse-tree
Namespace: A-Z: (UNKNOWN 0)
symtree: dr Ambig 0
symbol dr (REAL 8)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: sx Ambig 0
symbol sx (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: ds Ambig 0
symbol ds (REAL 8)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: sr Ambig 0
symbol sr (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: dx Ambig 0
symbol dx (REAL 8)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: nearest Ambig 0
symbol nearest (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC FUNCTION)
result: nearest
symtree: ss Ambig 0
symbol ss (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
symtree: test_nearest Ambig 0
symbol test_nearest (UNKNOWN 0)(PROGRAM UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC)
ASSIGN sx 0.1237e1
ASSIGN ss 0.1e1
ASSIGN sr _gfortran_nearest[[((sx) (ss))]]
WRITE UNIT=6 FMT=1
TRANSFER 'nearest('
TRANSFER sx
TRANSFER ','
TRANSFER ss
TRANSFER ') = '
TRANSFER sr
DT_END
ASSIGN ss -0.1e1
ASSIGN sr _gfortran_nearest[[((sx) (ss))]]
WRITE UNIT=6 FMT=1
TRANSFER 'nearest('
TRANSFER sx
TRANSFER ','
TRANSFER ss
TRANSFER ') = '
TRANSFER sr
DT_END
ASSIGN dx 0.1237e1_8
ASSIGN ds 0.1e1_8
ASSIGN dr __convert_r4_r8[[((_gfortran_nearest[[((dx) (ds))]]))]]
WRITE UNIT=6 FMT=2
TRANSFER 'nearest('
TRANSFER dx
TRANSFER ','
TRANSFER ds
TRANSFER ') = '
TRANSFER dr
DT_END
ASSIGN ds -0.1e1_8
ASSIGN dr __convert_r4_r8[[((_gfortran_nearest[[((dx) (ds))]]))]]
WRITE UNIT=6 FMT=2
TRANSFER 'nearest('
TRANSFER dx
TRANSFER ','
TRANSFER ds
TRANSFER ') = '
TRANSFER dr
DT_END
[tobi@marktplatz tests]$
So yeah, the frontend is at fault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15205
next prev parent reply other threads:[~2004-04-30 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 18:01 [Bug fortran/15205] New: " gcc-bugzilla at gcc dot gnu dot org
2004-04-29 18:13 ` [Bug fortran/15205] [gfortran] " pinskia at gcc dot gnu dot org
2004-04-29 18:57 ` [Bug libfortran/15205] " pinskia at gcc dot gnu dot org
2004-04-30 0:51 ` bdavis9659 at comcast dot net
2004-04-30 16:44 ` Tobias dot Schlueter at physik dot uni-muenchen dot de [this message]
2004-04-30 17:06 ` [Bug fortran/15205] " Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-30 18:13 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-01 3:01 ` bdavis at gcc dot gnu dot org
2004-05-08 16:17 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-08 17:28 ` pinskia at gcc dot gnu dot org
2004-05-14 18:38 ` cvs-commit at gcc dot gnu dot org
2004-05-14 18:52 ` tobi 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=20040430163511.19471.qmail@sources.redhat.com \
--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).