This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, Fortran] PR fortran/40045: Fix -fdump-parse-tree and typebound procedures
- From: Daniel Kraft <d at domob dot eu>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 14 May 2009 21:20:33 +0200
- Subject: [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;
}