@@ -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;
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(-)