This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran] PR fortran/40045: Fix -fdump-parse-tree and typebound procedures


Hi all,

this patch fixes the problem in PR 40045, which is a left-over from my type-bound procedures clean-up some time ago. It is certainly near obvious...

Regression-testing now on GNU/Linux-x86-32. Ok for trunk if successful?

Daniel

--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri
2009-05-14  Daniel Kraft  <d@domob.eu>

	PR fortran/40045
	* dump-parse-tree.c (show_typebound): Fix missing adaption to new
	type-bound procedure storage structure.
Index: gcc/fortran/dump-parse-tree.c
===================================================================
--- gcc/fortran/dump-parse-tree.c	(revision 147534)
+++ gcc/fortran/dump-parse-tree.c	(working copy)
@@ -680,9 +680,7 @@ show_components (gfc_symbol *sym)
 static void
 show_typebound (gfc_symtree* st)
 {
-  if (!st->n.tb)
-    return;
-
+  gcc_assert (st->n.tb);
   show_indent ();
 
   if (st->n.tb->is_generic)
@@ -708,7 +706,7 @@ show_typebound (gfc_symtree* st)
   else
     fputs (", PRIVATE", dumpfile);
 
-  fprintf (dumpfile, " :: %s => ", st->n.sym->name);
+  fprintf (dumpfile, " :: %s => ", st->name);
 
   if (st->n.tb->is_generic)
     {
@@ -739,7 +737,7 @@ show_f2k_derived (gfc_namespace* f2k)
     }
 
   /* Type-bound procedures.  */
-  gfc_traverse_symtree (f2k->sym_root, &show_typebound);
+  gfc_traverse_symtree (f2k->tb_sym_root, &show_typebound);
 
   --show_level;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]