re PR fortran/68684 (gcc/fortran/resolve.c:8748: bad if test ?)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Fri, 4 Dec 2015 16:37:54 +0000 (16:37 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Fri, 4 Dec 2015 16:37:54 +0000 (16:37 +0000)
2015-12-04  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68684
* resolve.c (resolve_lock_unlock_event): Fix logic faux pas.

From-SVN: r231281

gcc/fortran/resolve.c

index 6598855f81a503af11f119e26e71ea75101fd538..10add62a8391733a314c2dfa21d30b42c9ce87bd 100644 (file)
@@ -8745,7 +8745,7 @@ resolve_lock_unlock_event (gfc_code *code)
              !gfc_is_coindexed (code->expr1))))
     gfc_error ("Lock variable at %L must be a scalar of type LOCK_TYPE",
               &code->expr1->where);
-  else if ((code->op == EXEC_EVENT_POST && code->op == EXEC_EVENT_WAIT)
+  else if ((code->op == EXEC_EVENT_POST || code->op == EXEC_EVENT_WAIT)
           && (code->expr1->ts.type != BT_DERIVED
               || code->expr1->expr_type != EXPR_VARIABLE
               || code->expr1->ts.u.derived->from_intmod