From patchwork Tue Oct 3 13:53:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 820896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-463391-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="M0z6+uI4"; dkim-atps=neutral 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 3y60rV6cTzz9t2Q for ; Wed, 4 Oct 2017 00:54:18 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=oU91YoMyI/XopKJtaBPk0vS+N2kFpZHnuXXbBW8QRZI+6Tj2d8 LLXC+XBcdrh2IGlWNLCSYbFWxTalKdwzAF22hhd56Ch8wsCiZuA66rBYtJQUwZ/Z 4daqOQ32av3LYaMl9O3jsesmODEHgsIYFREos5nGo266F/148lNur92ZQ= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=3qRDcqpLGP3f4g7mcFr/5yqhydQ=; b=M0z6+uI4tQddnurLMHGU cy0+rk5kgIbFzHR2tcDAO8Aq0hmqF9Ko9ZKb/yhLum5p6YsLtFdrJhp0fDWyUZkD CWVXVNxxmc9+t2d/QAlPAx/RIaiejb6hrLkUHTNEextah5val2SNfqzlNgIIYjKt HtFGBUR0m7HtBmz3gXS9Q4I= Received: (qmail 71319 invoked by alias); 3 Oct 2017 13:53:55 -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 71201 invoked by uid 89); 3 Oct 2017 13:53:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*tkoenig, H*M:5c3a, H*MI:netcologne, H*MI:5c3a X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Oct 2017 13:53:52 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 3E88F127E3; Tue, 3 Oct 2017 15:53:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 318F011DC4; Tue, 3 Oct 2017 15:53:49 +0200 (CEST) Received: from [78.35.161.68] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 59d3966d-029d-7f0000012729-7f0000019efa-1 for ; Tue, 03 Oct 2017 15:53:49 +0200 Received: from [192.168.178.20] (xdsl-78-35-161-68.netcologne.de [78.35.161.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 3 Oct 2017 15:53:47 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Handle EXEC_WAIT in Fortran tree dump Message-ID: <1490c1a2-f8ba-42a6-5c3a-252da8b22fa2@netcologne.de> Date: Tue, 3 Oct 2017 15:53:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Hello world, I noticed that EXEC_WAIT wasn't handled in the Fortran tree dump. This patch does that. While preparing this, I also noticed that the values for the END and EOR tags were interchanged and fixed this as well. Committed as obvious and simple. Just a cleanup for the time when WAIT actually does anything :-) Regards Thomas 2017-10-03 Thomas Koenig * io.c (match_wait_element): Correctly match END and EOR tags. * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT. Index: io.c =================================================================== --- io.c (Revision 253377) +++ io.c (Arbeitskopie) @@ -4641,8 +4641,8 @@ match_wait_element (gfc_wait *wait) m = match_etag (&tag_unit, &wait->unit); RETM m = match_ltag (&tag_err, &wait->err); - RETM m = match_ltag (&tag_end, &wait->eor); - RETM m = match_ltag (&tag_eor, &wait->end); + RETM m = match_ltag (&tag_end, &wait->end); + RETM m = match_ltag (&tag_eor, &wait->eor); RETM m = match_etag (&tag_iomsg, &wait->iomsg); if (m == MATCH_YES && !check_char_variable (wait->iomsg)) return MATCH_ERROR; Index: dump-parse-tree.c =================================================================== --- dump-parse-tree.c (Revision 253377) +++ dump-parse-tree.c (Arbeitskopie) @@ -2727,6 +2727,41 @@ show_code_node (int level, gfc_code *c) fprintf (dumpfile, " EOR=%d", dt->eor->value); break; + case EXEC_WAIT: + fputs ("WAIT", dumpfile); + + if (c->ext.wait != NULL) + { + gfc_wait *wait = c->ext.wait; + if (wait->unit) + { + fputs (" UNIT=", dumpfile); + show_expr (wait->unit); + } + if (wait->iostat) + { + fputs (" IOSTAT=", dumpfile); + show_expr (wait->iostat); + } + if (wait->iomsg) + { + fputs (" IOMSG=", dumpfile); + show_expr (wait->iomsg); + } + if (wait->id) + { + fputs (" ID=", dumpfile); + show_expr (wait->id); + } + if (wait->err) + fprintf (dumpfile, " ERR=%d", wait->err->value); + if (wait->end) + fprintf (dumpfile, " END=%d", wait->end->value); + if (wait->eor) + fprintf (dumpfile, " EOR=%d", wait->eor->value); + } + break; + case EXEC_OACC_PARALLEL_LOOP: case EXEC_OACC_PARALLEL: case EXEC_OACC_KERNELS_LOOP: