From: Paul Brook Date: Sat, 22 May 2004 15:52:42 +0000 (+0000) Subject: dump-parse-tree.c (gfc_show_equiv): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1854117e11b923066d0ecbc800c9db6ec064c9d7;p=gcc.git dump-parse-tree.c (gfc_show_equiv): New function. * dump-parse-tree.c (gfc_show_equiv): New function. (gfc_show_namespace): Use it. From-SVN: r82136 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 409992e0e9e..a122e70d2f2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2004-05-22 Pau Brook + + * dump-parse-tree.c (gfc_show_equiv): New function. + (gfc_show_namespace): Use it. + 2004-05-22 Victor Leikehman PR fortran/13249 diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 5f1db22689b..64e4a81ee7d 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -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');