From patchwork Wed May 10 16:48:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 92214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3770173vqo; Wed, 10 May 2023 09:51:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nNi/dfkTP5yI9LaEcKpkL10E7Nf94yi+clrxe/oqAMcT4bcgruqH3U8epxe92wjhRUHod X-Received: by 2002:a17:907:97cb:b0:96a:4654:9a57 with SMTP id js11-20020a17090797cb00b0096a46549a57mr1109954ejc.54.1683737492279; Wed, 10 May 2023 09:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683737492; cv=none; d=google.com; s=arc-20160816; b=mOpipMRn8ZpH915PuvpKBIumCmgmdB5bgC6heqYafRptX+K7tjOq377nqRktiaMEY7 WsVsKPSkAX711VnBSccJpSDH/GThH7ZjvjjXUUX8UrlheDZNhgQdtqYUDAWwgTkOMwJJ 5d9GpRogr94oXwctwzcOA4FZ8NnUVJP9F/BkgcApzNLIKCvt9c4lEfp/Dngnf3eWfpjH llYmV4TD+xIKSMkbsE7wTdwDBCOzgrS8PYaQZeB31uVe56JubG/66lBn3+HHiibOr8Qg U/VmMU6mjjxoBm5zopLTHBS0afXPhx6eel3+3XAA4sRwMzt0r14NeaYREE9RzLpQh8GX 5QKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=mzRICJ8aezvNYezC1izf5S0yDNYL4wdfQxZeqjvBEmo=; b=dyCYyuHO3mp8WP6X86TiegPNKnrKgDyioOqIbwdtb8zsumfbFFGiBs3SuUhzrcFfCN 6iwo/A9cmHKmQ5OgfVqgMXiexOnfVSR8/INW4MmOujQsYuM1+oMWO1e0uuPbAYuNA8Ze SIGYKyV+7kdv3oyusvAGbdpK5SHvs4cFaJyNr0riVTLvkMb57oCkkHUcpOSI3QZDwUQ5 7pQ8BS2ZwS3RfS4qGaLOfJAnk31stG2xlVcyt2Jh9UEs2v7rbsibJQM6rWfue2NWYw05 8GoXg7VCQSlXNVw+iGnyvPGaBMgDCpnT2x3GFfxmDPrHz97Rn5rRDZHpPW8O2buro4na BTJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ur6ePrib; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id h25-20020a170906855900b0094efa335a49si3707225ejy.851.2023.05.10.09.51.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 09:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ur6ePrib; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 540CD3853829 for ; Wed, 10 May 2023 16:50:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 540CD3853829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683737405; bh=mzRICJ8aezvNYezC1izf5S0yDNYL4wdfQxZeqjvBEmo=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Ur6ePrib+z1sAcwdS5GcFZ+QHPuLZp4doMf7OZlmMQ3TvxDjdydQDEXAEx4SQ9qFL 7uZws7YSK2bQPK+Xc/a06hI6y27bgvlm9PP74fZLIcpfbAA3+4BQ56kX5hfA6dSOO6 cxvLBej8fCqN3+0VLUrja0NLLsoKqJxdkDJwlRh8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 0159C386D623; Wed, 10 May 2023 16:49:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0159C386D623 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-965e93f915aso1207150166b.2; Wed, 10 May 2023 09:49:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683737340; x=1686329340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mzRICJ8aezvNYezC1izf5S0yDNYL4wdfQxZeqjvBEmo=; b=TJdi8B885xe85opbn46ddROMIh8dVCDgw80Vczz0MCnxg89xEY1SuO9YJTj7dO6nZ1 Smxa+GWF+8QRHj07t2/dtajy4jczl4gMCJdRaNFjbfNSkCXjx08U6iyM7Ot+RsaTbhRt 6cHy6ii81WygiA57v6v37QOvFYcjWDTp30f3gJh6F/E0H2tVIYF+3+/bfw1mNYSsRcD0 Qd0CJzykxYoq9DBmfqXAn2KdFHeEjQNVjkutv1LfTN5yp+wt4WP8F/yL6PTWGHQVQZfX J1pSQXQojP5dHDv+oGGCkPX7ujrsqaHTY6WaQXVkogZi1hb7nO+cf+hi4n76tnlQo2kd kDgw== X-Gm-Message-State: AC+VfDycF9796JCLrYqCip1YM+gBuRbrCNmBduYjdaTl/1OCR8aLAvJe C8CEdbLLBr7dDTDlgulzfIVrBRThedw= X-Received: by 2002:a17:907:1614:b0:94d:8b66:46d1 with SMTP id hb20-20020a170907161400b0094d8b6646d1mr16835209ejc.6.1683737340181; Wed, 10 May 2023 09:49:00 -0700 (PDT) Received: from nbbrfq (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id hv7-20020a17090760c700b00965be665811sm2897600ejc.2.2023.05.10.09.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 09:48:59 -0700 (PDT) Received: from b by nbbrfq with local (Exim 4.96) (envelope-from ) id 1pwmzq-000eXS-2u; Wed, 10 May 2023 18:48:58 +0200 To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org, Bernhard Reutner-Fischer Subject: [PATCH 2/2] Fortran: dump-parse-tree: Mark debug functions with DEBUG_FUNCTION Date: Wed, 10 May 2023 18:48:41 +0200 Message-Id: <20230510164841.155816-2-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230510164841.155816-1-rep.dot.nop@gmail.com> References: <20230510164841.155816-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765526724772470895?= X-GMAIL-MSGID: =?utf-8?q?1765526724772470895?= From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration. (debug): Add DEBUG_FUNCTION. (show_code_node): Remove erroneous whitespace. --- Regression tested on x86_64-linux, OK for trunk? --- gcc/fortran/dump-parse-tree.cc | 38 ++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index 2380fa04796..644f8f37d63 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -55,10 +55,8 @@ static void show_typespec (gfc_typespec *); static void show_ref (gfc_ref *); static void show_attr (symbol_attribute *, const char *); -/* Allow dumping of an expression in the debugger. */ -void gfc_debug_expr (gfc_expr *); - -void debug (symbol_attribute *attr) +DEBUG_FUNCTION void +debug (symbol_attribute *attr) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -67,7 +65,8 @@ void debug (symbol_attribute *attr) dumpfile = tmp; } -void debug (gfc_formal_arglist *formal) +DEBUG_FUNCTION void +debug (gfc_formal_arglist *formal) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -80,12 +79,14 @@ void debug (gfc_formal_arglist *formal) dumpfile = tmp; } -void debug (symbol_attribute attr) +DEBUG_FUNCTION void +debug (symbol_attribute attr) { debug (&attr); } -void debug (gfc_expr *e) +DEBUG_FUNCTION void +debug (gfc_expr *e) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -102,7 +103,8 @@ void debug (gfc_expr *e) dumpfile = tmp; } -void debug (gfc_typespec *ts) +DEBUG_FUNCTION void +debug (gfc_typespec *ts) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -111,12 +113,14 @@ void debug (gfc_typespec *ts) dumpfile = tmp; } -void debug (gfc_typespec ts) +DEBUG_FUNCTION void +debug (gfc_typespec ts) { debug (&ts); } -void debug (gfc_ref *p) +DEBUG_FUNCTION void +debug (gfc_ref *p) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -125,7 +129,7 @@ void debug (gfc_ref *p) dumpfile = tmp; } -void +DEBUG_FUNCTION void debug (gfc_namespace *ns) { FILE *tmp = dumpfile; @@ -135,7 +139,7 @@ debug (gfc_namespace *ns) dumpfile = tmp; } -void +DEBUG_FUNCTION void gfc_debug_expr (gfc_expr *e) { FILE *tmp = dumpfile; @@ -147,7 +151,7 @@ gfc_debug_expr (gfc_expr *e) /* Allow for dumping of a piece of code in the debugger. */ -void +DEBUG_FUNCTION void gfc_debug_code (gfc_code *c) { FILE *tmp = dumpfile; @@ -157,7 +161,8 @@ gfc_debug_code (gfc_code *c) dumpfile = tmp; } -void debug (gfc_symbol *sym) +DEBUG_FUNCTION void +debug (gfc_symbol *sym) { FILE *tmp = dumpfile; dumpfile = stderr; @@ -2513,7 +2518,7 @@ show_code_node (int level, gfc_code *c) case EXEC_SYNC_MEMORY: fputs ("SYNC MEMORY ", dumpfile); if (c->expr2 != NULL) - { + { fputs (" stat=", dumpfile); show_expr (c->expr2); } @@ -4031,7 +4036,8 @@ gfc_dump_global_symbols (FILE *f) /* Show an array ref. */ -void debug (gfc_array_ref *ar) +DEBUG_FUNCTION void +debug (gfc_array_ref *ar) { FILE *tmp = dumpfile; dumpfile = stderr;