]> gcc.gnu.org Git - gcc.git/commitdiff
dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 31 Mar 2019 15:21:10 +0000 (15:21 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 31 Mar 2019 15:21:10 +0000 (15:21 +0000)
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

gcc/fortran/ChangeLog
gcc/fortran/dump-parse-tree.c

index 191451346f7c0f3e1c05316b12f4640f901f2587..e80033a7d4e4f679b1fa167968c86da382d8e190 100644 (file)
@@ -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
index f798ed0a44715e48dd8e3f26c8d2b7266e97aca8..7a74c317fd580ff576cca91d5cb967e0307b308d 100644 (file)
@@ -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)
 {
This page took 0.070272 seconds and 5 git commands to generate.