From: Thomas Koenig Date: Sun, 31 Mar 2019 15:21:10 +0000 (+0000) Subject: dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60e8cda6740265f9af398d8518725b5b98e6e024;p=gcc.git dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref * arguments. 2019-03-31 Thomas Koenig * dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref * arguments. From-SVN: r270044 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 191451346f7..e80033a7d4e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-03-31 Thomas Koenig + + * dump-parse-tree.c (debug): Add for symbol_attribute *, + symbol_attribute and gfc_ref * arguments. + 2019-03-30 Paul Thomas PR fortran/89841 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) {