OSDN Git Service

* dump-parse-tree.c (gfc_show_equiv): New function.
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 May 2004 15:52:42 +0000 (15:52 +0000)
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 May 2004 15:52:42 +0000 (15:52 +0000)
(gfc_show_namespace): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82136 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 409992e..a122e70 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-22  Pau Brook  <paul@codesourcery.com>
+
+       * dump-parse-tree.c (gfc_show_equiv): New function.
+       (gfc_show_namespace): Use it.
+
 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
 
        PR fortran/13249
index 5f1db22..64e4a81 100644 (file)
@@ -1384,6 +1384,23 @@ gfc_show_code_node (int level, gfc_code * c)
 }
 
 
+/* Show and equivalence chain.  */
+
+static void
+gfc_show_equiv (gfc_equiv *eq)
+{
+  show_indent ();
+  gfc_status ("Equivalence: ");
+  while (eq)
+    {
+      gfc_show_expr (eq->expr);
+      eq = eq->eq;
+      if (eq)
+       gfc_status (", ");
+    }
+}
+
+    
 /* Show a freakin' whole namespace.  */
 
 void
@@ -1392,6 +1409,7 @@ gfc_show_namespace (gfc_namespace * ns)
   gfc_interface *intr;
   gfc_namespace *save;
   gfc_intrinsic_op op;
+  gfc_equiv *eq;
   int i;
 
   save = gfc_current_ns;
@@ -1450,6 +1468,9 @@ gfc_show_namespace (gfc_namespace * ns)
          gfc_traverse_user_op (ns, show_uop);
        }
     }
+  
+  for (eq = ns->equiv; eq; eq = eq->next)
+    gfc_show_equiv (eq);
 
   gfc_status_char ('\n');
   gfc_status_char ('\n');