diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-14 18:15:36 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-14 18:15:36 +0000 |
commit | f253fdbba9800478ccf44a7573e1a6c61ce31ad7 (patch) | |
tree | 124f444a6881115fbf61e6aafe6dc4f539632515 /gcc/fortran/dump-parse-tree.c | |
parent | 9ff5ab90897a839d171e0fae5b073e216e5022a5 (diff) |
2016-11-14 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (show_code): Add prototype.
(gfc_debug_code): New function.
(show_code_node): Add space after SELECT TYPE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index ff47f3fe853b..585f25d632eb 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -47,6 +47,7 @@ static FILE *dumpfile; static void show_expr (gfc_expr *p); static void show_code_node (int, gfc_code *); static void show_namespace (gfc_namespace *ns); +static void show_code (int, gfc_code *); /* Allow dumping of an expression in the debugger. */ @@ -62,6 +63,18 @@ gfc_debug_expr (gfc_expr *e) dumpfile = tmp; } +/* Allow for dumping of a piece of code in the debugger. */ +void gfc_debug_code (gfc_code *c); + +void +gfc_debug_code (gfc_code *c) +{ + FILE *tmp = dumpfile; + dumpfile = stderr; + show_code (1, c); + fputc ('\n', dumpfile); + dumpfile = tmp; +} /* Do indentation for a specific level. */ @@ -1987,7 +2000,7 @@ show_code_node (int level, gfc_code *c) case EXEC_SELECT_TYPE: d = c->block; if (c->op == EXEC_SELECT_TYPE) - fputs ("SELECT TYPE", dumpfile); + fputs ("SELECT TYPE ", dumpfile); else fputs ("SELECT CASE ", dumpfile); show_expr (c->expr1); |