From patchwork Fri Dec 4 16:39:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Kargl X-Patchwork-Id: 552802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 18A0A140306 for ; Sat, 5 Dec 2015 03:39:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=AHxPLTVf; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=QT3rLowQG53rmlfHF02ef3HS28BsyEMrIi8g6t53gGGHXJdcbP0iQ 1DVzr5l6Y5zXFJ6PQWY9PUkdl7Rsi0G7WZDe3cHbyr9nCRYmeF3kY7x6mg839DTA ppDlhmTdIzh83LZgpHl5RnG9dHRZqg8lB4MWABxC9VkISlIwqjfbBE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=3Skj0F6EAzPcm0epTZtyklrhdIQ=; b=AHxPLTVfQSjjBdpfXkZ9 9szU1Vykqxv+0+3f8AHKB9mN+gY6yWvN8a3bgXaosQPkKvBQ5gjNaKfLx14Kj2w9 5mfL/zCUuG3yt31ahMmiXFLpT4UYziB0jZ6gi/L7ZMsEIZ8Me3QWUL0f5tbthB+l nbNyV7swqSFh8hxIlqxTGoQ= Received: (qmail 100133 invoked by alias); 4 Dec 2015 16:39:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 100115 invoked by uid 89); 4 Dec 2015 16:39:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 04 Dec 2015 16:39:34 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id tB4GdWwI079734 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 4 Dec 2015 08:39:32 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id tB4GdWTG079733; Fri, 4 Dec 2015 08:39:32 -0800 (PST) (envelope-from sgk) Date: Fri, 4 Dec 2015 08:39:32 -0800 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH, committed] Fix PR fortran/68684 Message-ID: <20151204163932.GA79630@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) I've committed the obvious patch after confirmation from the original author that it is correct. 2015-12-04 Steven G. Kargl PR fortran/68684 * resolve.c (resolve_lock_unlock_event): Fix logic faux pas. Index: resolve.c =================================================================== --- resolve.c (revision 231243) +++ resolve.c (working copy) @@ -8745,7 +8745,7 @@ resolve_lock_unlock_event (gfc_code *cod !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