aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2019-03-31 15:21:10 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2019-03-31 15:21:10 +0000
commit60e8cda6740265f9af398d8518725b5b98e6e024 (patch)
treecacd6bb93b146e85fa08b55c2a03d95420fa7d04
parent1605fb3ed04c6958c292deec72e120f787e4843d (diff)
downloadgcc-60e8cda6740265f9af398d8518725b5b98e6e024.zip
gcc-60e8cda6740265f9af398d8518725b5b98e6e024.tar.gz
gcc-60e8cda6740265f9af398d8518725b5b98e6e024.tar.bz2
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
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/dump-parse-tree.c25
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1914513..e80033a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * dump-parse-tree.c (debug): Add for symbol_attribute *,
+ symbol_attribute and gfc_ref * arguments.
+
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index f798ed0..7a74c31 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)
{