public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/62270] New: -Wlogical-not-parentheses warnings
@ 2014-08-26 17:22 mpolacek at gcc dot gnu.org
  2014-09-02  7:52 ` [Bug fortran/62270] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-08-26 17:22 UTC (permalink / raw)
  To: gcc-bugs

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.


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

end of thread, other threads:[~2014-09-06  8:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-26 17:22 [Bug fortran/62270] New: -Wlogical-not-parentheses warnings mpolacek at gcc dot gnu.org
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

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