public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jvdelisle at charter dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/95647] operator(.eq.) and operator(==) treated differently
Date: Sun, 07 Feb 2021 17:55:56 +0000 [thread overview]
Message-ID: <bug-95647-4-okN5P03395@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95647-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95647
--- Comment #8 from Jerry DeLisle <jvdelisle at charter dot net> ---
(In reply to Jerry DeLisle from comment #6)
> (In reply to Bill Long from comment #5)
> > Is this fixed in a release version of GCC?
>
> Submitting patch for approval and will backport as the fix is simple. How
> far back shall we go? 10 for sure. Eyeballing the time lines, it does not
> look like 9 will have any more releases. If someone knows otherwise, let me
> know.
While putting together a test case, I found another problem.
program test
use, intrinsic :: ieee_arithmetic, only : &
& ieee_class, &
& ieee_class_type, &
& ieee_negative_normal, &
& ieee_positive_normal, &
& operator(.eq.)
! use, intrinsic :: ieee_arithmetic
real(4) r4
type(ieee_class_type) class1
r4 = 1.0
class1 = ieee_class(r4)
if (class1 .eq. ieee_positive_normal) print *, 'yes'
if (class1 .ne. ieee_negative_normal) print *, 'yes'
r4 = -1.0
class1 = ieee_class(r4)
if (class1 .eq. ieee_negative_normal) print *, 'yes'
if (class1 .ne. ieee_positive_normal) print *, 'yes'
end program test
$ gfc pr95647.f90
pr95647.f90:14:6:
14 | if (class1 .ne. ieee_negative_normal) print *, 'yes'
| 1
Error: Operands of comparison operator ‘.ne.’ at (1) are
TYPE(ieee_class_type)/TYPE(ieee_class_type)
pr95647.f90:18:6:
18 | if (class1 .ne. ieee_positive_normal) print *, 'yes'
| 1
Error: Operands of comparison operator ‘.ne.’ at (1) are
TYPE(ieee_class_type)/TYPE(ieee_class_type)
There is more to the story apparently
next prev parent reply other threads:[~2021-02-07 17:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 21:14 [Bug fortran/95647] New: " longb at cray dot com
2020-06-11 21:49 ` [Bug fortran/95647] " dominiq at lps dot ens.fr
2020-06-11 22:50 ` kargl at gcc dot gnu.org
2020-06-13 8:11 ` tkoenig at gcc dot gnu.org
2020-06-13 16:16 ` sgk at troutmask dot apl.washington.edu
2021-01-22 17:53 ` longb at cray dot com
2021-02-07 16:35 ` jvdelisle at charter dot net
2021-02-07 17:04 ` longb at cray dot com
2021-02-07 17:55 ` jvdelisle at charter dot net [this message]
2021-02-08 0:30 ` kargl at gcc dot gnu.org
2021-02-09 4:46 ` jvdelisle at charter dot net
2021-02-12 15:58 ` cvs-commit at gcc dot gnu.org
2021-02-12 21:05 ` cvs-commit at gcc dot gnu.org
2021-02-13 21:44 ` jvdelisle at gcc dot gnu.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=bug-95647-4-okN5P03395@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).