public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/52087] program does not follow logical rules
Date: Thu, 02 Feb 2012 02:10:00 -0000 [thread overview]
Message-ID: <bug-52087-4-ztZnK8UaZm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52087-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52087
--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2012-02-02 02:10:04 UTC ---
On Thu, Feb 02, 2012 at 12:57:29AM +0000, ryan.maclellan at ua dot edu wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52087
>
> --- Comment #2 from Ryan MacLellan <ryan.maclellan at ua dot edu> 2012-02-02 00:57:29 UTC ---
> I believe precedence is as follows:
> arithmetic expressions evaluated first
> followed by relational operators
> followed by logical operators
>
> In this case I believe .eqv. are relational operators (equivalent to .eq.) and
> .or. is the logical operator. So the .or. should be evaluated last but it
> doesn't seem to be. If this is not the design precedence or .eqv. is not
> considered a relational operators then I may simply be in error. Otherwise I
> think this is a bug.
>
See Table 7.7 in the Fortran 2003 standard (Or your favorite
Fortran reference).
Table 7.7: Categories of operations and relative precedence
Category of operation Operators Precedence
Extension defined-unary-op Highest
Numeric ** .
Numeric * or / .
Numeric unary + or - .
Numeric binary + or - .
Character // .
Relational .EQ., .NE., .LT., .LE., .GT., .GE.,
==, /=, <, <=, >, >= .
Logical .NOT. .
Logical .AND. .
Logical .OR. .
Logical .EQV. or .NEQV. .
Extension defined-binary-op Lowest
next prev parent reply other threads:[~2012-02-02 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 0:17 [Bug libfortran/52087] New: " ryan.maclellan at ua dot edu
2012-02-02 0:46 ` [Bug libfortran/52087] " kargl at gcc dot gnu.org
2012-02-02 0:58 ` ryan.maclellan at ua dot edu
2012-02-02 2:10 ` sgk at troutmask dot apl.washington.edu [this message]
2012-02-02 2:32 ` ryan.maclellan at ua dot edu
2012-02-02 8:36 ` burnus 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-52087-4-ztZnK8UaZm@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).