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

            Bug ID: 67826
           Summary: gcc/fortran/openmp.c:1808: bad test ?
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

During a recent fortran build, I found

../../src/trunk/gcc/fortran/openmp.c:1808:33: warning: logical ‘and’ of
mutually exclusive tests is always false [-Wlogical-op]

Source code is

      && (ts->type == BT_DERIVED && ts->type == BT_CLASS)))

Maybe better code

      && (ts->type == BT_DERIVED || ts->type == BT_CLASS)))

I recommend an occasional fortran build with -Wlogical-op.

Reply via email to