From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org, Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Subject: [PATCH 2/2] Fortran: dump-parse-tree: Mark debug functions with DEBUG_FUNCTION
Date: Wed, 10 May 2023 18:48:41 +0200 [thread overview]
Message-ID: <20230510164841.155816-2-rep.dot.nop@gmail.com> (raw)
In-Reply-To: <20230510164841.155816-1-rep.dot.nop@gmail.com>
From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
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;
--
2.30.2
next prev parent reply other threads:[~2023-05-10 16:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 16:48 [PATCH 1/2] Fortran: dump-parse-tree attribs: fix unbalanced braces [PR109624] Bernhard Reutner-Fischer
2023-05-10 16:48 ` Bernhard Reutner-Fischer [this message]
[not found] ` <204c1734-a74c-1575-d042-3aef696f6f6a@netcologne.de>
2023-05-10 19:11 ` Bernhard Reutner-Fischer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230510164841.155816-2-rep.dot.nop@gmail.com \
--to=rep.dot.nop@gmail.com \
--cc=aldot@gcc.gnu.org \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).