public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/62270] New: -Wlogical-not-parentheses warnings
Date: Tue, 26 Aug 2014 17:22:00 -0000	[thread overview]
Message-ID: <bug-62270-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62270

            Bug ID: 62270
           Summary: -Wlogical-not-parentheses warnings
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org

-Wlogical-not-parentheses detected these two issues:

interface.c:compare_parameter
2013   /* F2008, 12.5.2.5; IR F08/0073.  */
2014   if (formal->ts.type == BT_CLASS && formal->attr.class_ok
2015       && actual->expr_type != EXPR_NULL
2016       && ((CLASS_DATA (formal)->attr.class_pointer
2017            && !formal->attr.intent == INTENT_IN)

trans-expr.c:gfc_conv_procedure_call
4445                   if (fsym->attr.optional
4446                       && e->expr_type == EXPR_VARIABLE
4447                       && (!e->ref
4448                           || (e->ref->type == REF_ARRAY
4449                               && !e->ref->u.ar.type != AR_FULL))

But my attempts to fix these failed.
The first one should likely be "&& formal->attr.intent != INTENT_IN)", but that
regressed gfortran.dg/pointer_intent_7.f90 test.  If I change it to "==", many
tests fail.
For the second one, perhaps just the "!" should be dropped, but I'm not sure
about that, testsuite didn't reveal anything.

Currently this PR is the last thing that is blocking the inclusion of
-Wlogical-not-parentheses in -Wall - I'd appreciate if anyone could look into
this PR.


             reply	other threads:[~2014-08-26 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 17:22 mpolacek at gcc dot gnu.org [this message]
2014-09-02  7:52 ` [Bug fortran/62270] " burnus at gcc dot gnu.org
2014-09-02  7:58 ` mpolacek at gcc dot gnu.org
2014-09-02 16:08 ` mpolacek at gcc dot gnu.org
2014-09-02 16:09 ` mpolacek at gcc dot gnu.org
2014-09-03 16:05 ` mpolacek at gcc dot gnu.org
2014-09-03 17:26 ` mpolacek at gcc dot gnu.org
2014-09-05 22:17 ` dcb314 at hotmail dot com
2014-09-06  8:22 ` mpolacek 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-62270-4@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).