diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-03-31 15:21:10 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-03-31 15:21:10 +0000 |
commit | 60e8cda6740265f9af398d8518725b5b98e6e024 (patch) | |
tree | cacd6bb93b146e85fa08b55c2a03d95420fa7d04 /gcc/fortran/dump-parse-tree.c | |
parent | 1605fb3ed04c6958c292deec72e120f787e4843d (diff) | |
download | gcc-60e8cda6740265f9af398d8518725b5b98e6e024.tar.gz |
dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref * arguments.
2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (debug): Add for symbol_attribute *,
symbol_attribute and gfc_ref * arguments.
From-SVN: r270044
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index f798ed0a447..7a74c317fd5 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -50,10 +50,26 @@ static void show_namespace (gfc_namespace *ns); static void show_code (int, gfc_code *); static void show_symbol (gfc_symbol *); 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) +{ + FILE *tmp = dumpfile; + dumpfile = stderr; + show_attr (attr, NULL); + fputc ('\n', dumpfile); + dumpfile = tmp; +} + +void debug (symbol_attribute attr) +{ + debug (&attr); +} + void debug (gfc_expr *e) { FILE *tmp = dumpfile; @@ -79,6 +95,15 @@ void debug (gfc_typespec ts) debug (&ts); } +void debug (gfc_ref *p) +{ + FILE *tmp = dumpfile; + dumpfile = stderr; + show_ref (p); + fputc ('\n', dumpfile); + dumpfile = tmp; +} + void gfc_debug_expr (gfc_expr *e) { |