From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71318 invoked by alias); 3 Oct 2017 13:53:55 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@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, 03 Oct 2017 13:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------4DC56516CA3EE5E939882778" X-SW-Source: 2017-10/txt/msg00014.txt.bz2 This is a multi-part message in MIME format. --------------4DC56516CA3EE5E939882778 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 529 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. --------------4DC56516CA3EE5E939882778 Content-Type: text/x-patch; name="p1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p1.diff" Content-length: 1791 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: --------------4DC56516CA3EE5E939882778--