2 Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3 Contributed by Steven Bosscher
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 /* Actually this is just a collection of routines that used to be
24 scattered around the sources. Now that they are all in a single
25 file, almost all of them can be static, and the other files don't
26 have this mess in them.
28 As a nice side-effect, this file can act as documentation of the
29 gfc_code and gfc_expr structures and all their friends and
37 /* Keep track of indentation for symbol tree dumps. */
38 static int show_level = 0;
41 /* Forward declaration because this one needs all, and all need
43 static void gfc_show_expr (gfc_expr *);
45 /* Do indentation for a specific level. */
48 code_indent (int level, gfc_st_label * label)
53 gfc_status ("%-5d ", label->value);
57 for (i = 0; i < 2 * level; i++)
58 gfc_status_char (' ');
62 /* Simple indentation at the current level. This one
63 is used to show symbols. */
68 code_indent (show_level, NULL);
72 /* Show type-specific information. */
74 gfc_show_typespec (gfc_typespec * ts)
77 gfc_status ("(%s ", gfc_basic_typename (ts->type));
82 gfc_status ("%s", ts->derived->name);
86 gfc_show_expr (ts->cl->length);
90 gfc_status ("%d", ts->kind);
98 /* Show an actual argument list. */
101 gfc_show_actual_arglist (gfc_actual_arglist * a)
106 for (; a; a = a->next)
108 gfc_status_char ('(');
109 if (a->name[0] != '\0')
110 gfc_status ("%s = ", a->name);
112 gfc_show_expr (a->expr);
114 gfc_status ("(arg not-present)");
116 gfc_status_char (')');
125 /* Show an gfc_array_spec array specification structure. */
128 gfc_show_array_spec (gfc_array_spec * as)
139 gfc_status ("(%d", as->rank);
145 case AS_EXPLICIT: c = "AS_EXPLICIT"; break;
146 case AS_DEFERRED: c = "AS_DEFERRED"; break;
147 case AS_ASSUMED_SIZE: c = "AS_ASSUMED_SIZE"; break;
148 case AS_ASSUMED_SHAPE: c = "AS_ASSUMED_SHAPE"; break;
151 ("gfc_show_array_spec(): Unhandled array shape type.");
153 gfc_status (" %s ", c);
155 for (i = 0; i < as->rank; i++)
157 gfc_show_expr (as->lower[i]);
158 gfc_status_char (' ');
159 gfc_show_expr (as->upper[i]);
160 gfc_status_char (' ');
168 /* Show an gfc_array_ref array reference structure. */
171 gfc_show_array_ref (gfc_array_ref * ar)
175 gfc_status_char ('(');
184 for (i = 0; i < ar->dimen; i++)
186 /* There are two types of array sections: either the
187 elements are identified by an integer array ('vector'),
188 or by an index range. In the former case we only have to
189 print the start expression which contains the vector, in
190 the latter case we have to print any of lower and upper
191 bound and the stride, if they're present. */
193 if (ar->start[i] != NULL)
194 gfc_show_expr (ar->start[i]);
196 if (ar->dimen_type[i] == DIMEN_RANGE)
198 gfc_status_char (':');
200 if (ar->end[i] != NULL)
201 gfc_show_expr (ar->end[i]);
203 if (ar->stride[i] != NULL)
205 gfc_status_char (':');
206 gfc_show_expr (ar->stride[i]);
210 if (i != ar->dimen - 1)
216 for (i = 0; i < ar->dimen; i++)
218 gfc_show_expr (ar->start[i]);
219 if (i != ar->dimen - 1)
225 gfc_status ("UNKNOWN");
229 gfc_internal_error ("gfc_show_array_ref(): Unknown array reference");
232 gfc_status_char (')');
236 /* Show a list of gfc_ref structures. */
239 gfc_show_ref (gfc_ref * p)
242 for (; p; p = p->next)
246 gfc_show_array_ref (&p->u.ar);
250 gfc_status (" %% %s", p->u.c.component->name);
254 gfc_status_char ('(');
255 gfc_show_expr (p->u.ss.start);
256 gfc_status_char (':');
257 gfc_show_expr (p->u.ss.end);
258 gfc_status_char (')');
262 gfc_internal_error ("gfc_show_ref(): Bad component code");
267 /* Display a constructor. Works recursively for array constructors. */
270 gfc_show_constructor (gfc_constructor * c)
273 for (; c; c = c->next)
275 if (c->iterator == NULL)
276 gfc_show_expr (c->expr);
279 gfc_status_char ('(');
280 gfc_show_expr (c->expr);
282 gfc_status_char (' ');
283 gfc_show_expr (c->iterator->var);
284 gfc_status_char ('=');
285 gfc_show_expr (c->iterator->start);
286 gfc_status_char (',');
287 gfc_show_expr (c->iterator->end);
288 gfc_status_char (',');
289 gfc_show_expr (c->iterator->step);
291 gfc_status_char (')');
300 /* Show an expression. */
303 gfc_show_expr (gfc_expr * p)
314 switch (p->expr_type)
317 c = p->value.character.string;
319 for (i = 0; i < p->value.character.length; i++, c++)
324 gfc_status ("%c", *c);
327 gfc_show_ref (p->ref);
331 gfc_status ("%s(", p->ts.derived->name);
332 gfc_show_constructor (p->value.constructor);
333 gfc_status_char (')');
338 gfc_show_constructor (p->value.constructor);
341 gfc_show_ref (p->ref);
345 gfc_status ("NULL()");
352 mpz_out_str (stdout, 10, p->value.integer);
354 if (p->ts.kind != gfc_default_integer_kind ())
355 gfc_status ("_%d", p->ts.kind);
359 if (p->value.logical)
360 gfc_status (".true.");
362 gfc_status (".false.");
366 mpf_out_str (stdout, 10, 0, p->value.real);
367 if (p->ts.kind != gfc_default_real_kind ())
368 gfc_status ("_%d", p->ts.kind);
372 c = p->value.character.string;
374 gfc_status_char ('\'');
376 for (i = 0; i < p->value.character.length; i++, c++)
381 gfc_status_char (*c);
384 gfc_status_char ('\'');
389 gfc_status ("(complex ");
391 mpf_out_str (stdout, 10, 0, p->value.complex.r);
392 if (p->ts.kind != gfc_default_complex_kind ())
393 gfc_status ("_%d", p->ts.kind);
397 mpf_out_str (stdout, 10, 0, p->value.complex.i);
398 if (p->ts.kind != gfc_default_complex_kind ())
399 gfc_status ("_%d", p->ts.kind);
412 gfc_status ("%s", p->symtree->n.sym->name);
413 gfc_show_ref (p->ref);
420 case INTRINSIC_UPLUS:
423 case INTRINSIC_UMINUS:
429 case INTRINSIC_MINUS:
432 case INTRINSIC_TIMES:
435 case INTRINSIC_DIVIDE:
438 case INTRINSIC_POWER:
441 case INTRINSIC_CONCAT:
454 gfc_status ("NEQV ");
480 ("gfc_show_expr(): Bad intrinsic in expression!");
483 gfc_show_expr (p->op1);
488 gfc_show_expr (p->op2);
495 if (p->value.function.name == NULL)
497 gfc_status ("%s[", p->symtree->n.sym->name);
498 gfc_show_actual_arglist (p->value.function.actual);
499 gfc_status_char (']');
503 gfc_status ("%s[[", p->value.function.name);
504 gfc_show_actual_arglist (p->value.function.actual);
505 gfc_status_char (']');
506 gfc_status_char (']');
512 gfc_internal_error ("gfc_show_expr(): Don't know how to show expr");
517 /* Show symbol attributes. The flavor and intent are followed by
518 whatever single bit attributes are present. */
521 gfc_show_attr (symbol_attribute * attr)
524 gfc_status ("(%s %s %s %s", gfc_code2string (flavors, attr->flavor),
525 gfc_intent_string (attr->intent),
526 gfc_code2string (access_types, attr->access),
527 gfc_code2string (procedures, attr->proc));
529 if (attr->allocatable)
530 gfc_status (" ALLOCATABLE");
532 gfc_status (" DIMENSION");
534 gfc_status (" EXTERNAL");
536 gfc_status (" INTRINSIC");
538 gfc_status (" OPTIONAL");
540 gfc_status (" POINTER");
542 gfc_status (" SAVE");
544 gfc_status (" TARGET");
546 gfc_status (" DUMMY");
548 gfc_status (" RESULT");
550 gfc_status (" ENTRY");
553 gfc_status (" DATA");
555 gfc_status (" USE-ASSOC");
556 if (attr->in_namelist)
557 gfc_status (" IN-NAMELIST");
559 gfc_status (" IN-COMMON");
562 gfc_status (" FUNCTION");
563 if (attr->subroutine)
564 gfc_status (" SUBROUTINE");
565 if (attr->implicit_type)
566 gfc_status (" IMPLICIT-TYPE");
569 gfc_status (" SEQUENCE");
571 gfc_status (" ELEMENTAL");
573 gfc_status (" PURE");
575 gfc_status (" RECURSIVE");
581 /* Show components of a derived type. */
584 gfc_show_components (gfc_symbol * sym)
588 for (c = sym->components; c; c = c->next)
590 gfc_status ("(%s ", c->name);
591 gfc_show_typespec (&c->ts);
593 gfc_status (" POINTER");
595 gfc_status (" DIMENSION");
596 gfc_status_char (' ');
597 gfc_show_array_spec (c->as);
600 gfc_status_char (' ');
605 /* Show a symbol. If a symbol is an ENTRY, SUBROUTINE or FUNCTION, we
606 show the interface. Information needed to reconstruct the list of
607 specific interfaces associated with a generic symbol is done within
611 gfc_show_symbol (gfc_symbol * sym)
613 gfc_formal_arglist *formal;
621 gfc_status ("symbol %s ", sym->name);
622 gfc_show_typespec (&sym->ts);
623 gfc_show_attr (&sym->attr);
628 gfc_status ("value: ");
629 gfc_show_expr (sym->value);
635 gfc_status ("Array spec:");
636 gfc_show_array_spec (sym->as);
642 gfc_status ("Generic interfaces:");
643 for (intr = sym->generic; intr; intr = intr->next)
644 gfc_status (" %s", intr->sym->name);
650 gfc_status ("result: %s", sym->result->name);
656 gfc_status ("components: ");
657 gfc_show_components (sym);
663 gfc_status ("Formal arglist:");
665 for (formal = sym->formal; formal; formal = formal->next)
666 gfc_status (" %s", formal->sym->name);
672 gfc_status ("Formal namespace");
673 gfc_show_namespace (sym->formal_ns);
676 gfc_status_char ('\n');
680 /* Show a user-defined operator. Just prints an operator
681 and the name of the associated subroutine, really. */
683 show_uop (gfc_user_op * uop)
688 gfc_status ("%s:", uop->name);
690 for (intr = uop->operator; intr; intr = intr->next)
691 gfc_status (" %s", intr->sym->name);
695 /* Workhorse function for traversing the user operator symtree. */
698 traverse_uop (gfc_symtree * st, void (*func) (gfc_user_op *))
706 traverse_uop (st->left, func);
707 traverse_uop (st->right, func);
711 /* Traverse the tree of user operator nodes. */
714 gfc_traverse_user_op (gfc_namespace * ns, void (*func) (gfc_user_op *))
717 traverse_uop (ns->uop_root, func);
721 /* Function to display a common block. */
724 show_common (gfc_symtree * st)
729 gfc_status ("common: /%s/ ", st->name);
731 s = st->n.common->head;
734 gfc_status ("%s", s->name);
739 gfc_status_char ('\n');
742 /* Worker function to display the symbol tree. */
745 show_symtree (gfc_symtree * st)
749 gfc_status ("symtree: %s Ambig %d", st->name, st->ambiguous);
751 if (st->n.sym->ns != gfc_current_ns)
752 gfc_status (" from namespace %s", st->n.sym->ns->proc_name->name);
754 gfc_show_symbol (st->n.sym);
758 /******************* Show gfc_code structures **************/
762 static void gfc_show_code_node (int level, gfc_code * c);
764 /* Show a list of code structures. Mutually recursive with
765 gfc_show_code_node(). */
768 gfc_show_code (int level, gfc_code * c)
771 for (; c; c = c->next)
772 gfc_show_code_node (level, c);
776 /* Show a single code node and everything underneath it if necessary. */
779 gfc_show_code_node (int level, gfc_code * c)
781 gfc_forall_iterator *fa;
791 code_indent (level, c->here);
800 gfc_status ("CONTINUE");
804 gfc_status ("ASSIGN ");
805 gfc_show_expr (c->expr);
806 gfc_status_char (' ');
807 gfc_show_expr (c->expr2);
809 case EXEC_LABEL_ASSIGN:
810 gfc_status ("LABEL ASSIGN ");
811 gfc_show_expr (c->expr);
812 gfc_status (" %d", c->label->value);
815 case EXEC_POINTER_ASSIGN:
816 gfc_status ("POINTER ASSIGN ");
817 gfc_show_expr (c->expr);
818 gfc_status_char (' ');
819 gfc_show_expr (c->expr2);
823 gfc_status ("GOTO ");
825 gfc_status ("%d", c->label->value);
828 gfc_show_expr (c->expr);
833 for (; d; d = d ->block)
835 code_indent (level, d->label);
836 if (d->block != NULL)
837 gfc_status_char (',');
839 gfc_status_char (')');
846 gfc_status ("CALL %s ", c->resolved_sym->name);
847 gfc_show_actual_arglist (c->ext.actual);
851 gfc_status ("RETURN ");
853 gfc_show_expr (c->expr);
857 gfc_status ("PAUSE ");
860 gfc_show_expr (c->expr);
862 gfc_status ("%d", c->ext.stop_code);
867 gfc_status ("STOP ");
870 gfc_show_expr (c->expr);
872 gfc_status ("%d", c->ext.stop_code);
876 case EXEC_ARITHMETIC_IF:
878 gfc_show_expr (c->expr);
879 gfc_status (" %d, %d, %d",
880 c->label->value, c->label2->value, c->label3->value);
886 gfc_show_expr (d->expr);
887 gfc_status_char ('\n');
888 gfc_show_code (level + 1, d->next);
891 for (; d; d = d->block)
893 code_indent (level, 0);
896 gfc_status ("ELSE\n");
899 gfc_status ("ELSE IF ");
900 gfc_show_expr (d->expr);
901 gfc_status_char ('\n');
904 gfc_show_code (level + 1, d->next);
907 code_indent (level, c->label);
909 gfc_status ("ENDIF");
914 gfc_status ("SELECT CASE ");
915 gfc_show_expr (c->expr);
916 gfc_status_char ('\n');
918 for (; d; d = d->block)
920 code_indent (level, 0);
922 gfc_status ("CASE ");
923 for (cp = d->ext.case_list; cp; cp = cp->next)
925 gfc_status_char ('(');
926 gfc_show_expr (cp->low);
927 gfc_status_char (' ');
928 gfc_show_expr (cp->high);
929 gfc_status_char (')');
930 gfc_status_char (' ');
932 gfc_status_char ('\n');
934 gfc_show_code (level + 1, d->next);
937 code_indent (level, c->label);
938 gfc_status ("END SELECT");
942 gfc_status ("WHERE ");
945 gfc_show_expr (d->expr);
946 gfc_status_char ('\n');
948 gfc_show_code (level + 1, d->next);
950 for (d = d->block; d; d = d->block)
952 code_indent (level, 0);
953 gfc_status ("ELSE WHERE ");
954 gfc_show_expr (d->expr);
955 gfc_status_char ('\n');
956 gfc_show_code (level + 1, d->next);
959 code_indent (level, 0);
960 gfc_status ("END WHERE");
965 gfc_status ("FORALL ");
966 for (fa = c->ext.forall_iterator; fa; fa = fa->next)
968 gfc_show_expr (fa->var);
969 gfc_status_char (' ');
970 gfc_show_expr (fa->start);
971 gfc_status_char (':');
972 gfc_show_expr (fa->end);
973 gfc_status_char (':');
974 gfc_show_expr (fa->stride);
976 if (fa->next != NULL)
977 gfc_status_char (',');
982 gfc_status_char (',');
983 gfc_show_expr (c->expr);
985 gfc_status_char ('\n');
987 gfc_show_code (level + 1, c->block->next);
989 code_indent (level, 0);
990 gfc_status ("END FORALL");
996 gfc_show_expr (c->ext.iterator->var);
997 gfc_status_char ('=');
998 gfc_show_expr (c->ext.iterator->start);
999 gfc_status_char (' ');
1000 gfc_show_expr (c->ext.iterator->end);
1001 gfc_status_char (' ');
1002 gfc_show_expr (c->ext.iterator->step);
1003 gfc_status_char ('\n');
1005 gfc_show_code (level + 1, c->block->next);
1007 code_indent (level, 0);
1008 gfc_status ("END DO");
1012 gfc_status ("DO WHILE ");
1013 gfc_show_expr (c->expr);
1014 gfc_status_char ('\n');
1016 gfc_show_code (level + 1, c->block->next);
1018 code_indent (level, c->label);
1019 gfc_status ("END DO");
1023 gfc_status ("CYCLE");
1025 gfc_status (" %s", c->symtree->n.sym->name);
1029 gfc_status ("EXIT");
1031 gfc_status (" %s", c->symtree->n.sym->name);
1035 gfc_status ("ALLOCATE ");
1038 gfc_status (" STAT=");
1039 gfc_show_expr (c->expr);
1042 for (a = c->ext.alloc_list; a; a = a->next)
1044 gfc_status_char (' ');
1045 gfc_show_expr (a->expr);
1050 case EXEC_DEALLOCATE:
1051 gfc_status ("DEALLOCATE ");
1054 gfc_status (" STAT=");
1055 gfc_show_expr (c->expr);
1058 for (a = c->ext.alloc_list; a; a = a->next)
1060 gfc_status_char (' ');
1061 gfc_show_expr (a->expr);
1067 gfc_status ("OPEN");
1072 gfc_status (" UNIT=");
1073 gfc_show_expr (open->unit);
1077 gfc_status (" IOSTAT=");
1078 gfc_show_expr (open->iostat);
1082 gfc_status (" FILE=");
1083 gfc_show_expr (open->file);
1087 gfc_status (" STATUS=");
1088 gfc_show_expr (open->status);
1092 gfc_status (" ACCESS=");
1093 gfc_show_expr (open->access);
1097 gfc_status (" FORM=");
1098 gfc_show_expr (open->form);
1102 gfc_status (" RECL=");
1103 gfc_show_expr (open->recl);
1107 gfc_status (" BLANK=");
1108 gfc_show_expr (open->blank);
1112 gfc_status (" POSITION=");
1113 gfc_show_expr (open->position);
1117 gfc_status (" ACTION=");
1118 gfc_show_expr (open->action);
1122 gfc_status (" DELIM=");
1123 gfc_show_expr (open->delim);
1127 gfc_status (" PAD=");
1128 gfc_show_expr (open->pad);
1130 if (open->err != NULL)
1131 gfc_status (" ERR=%d", open->err->value);
1136 gfc_status ("CLOSE");
1137 close = c->ext.close;
1141 gfc_status (" UNIT=");
1142 gfc_show_expr (close->unit);
1146 gfc_status (" IOSTAT=");
1147 gfc_show_expr (close->iostat);
1151 gfc_status (" STATUS=");
1152 gfc_show_expr (close->status);
1154 if (close->err != NULL)
1155 gfc_status (" ERR=%d", close->err->value);
1158 case EXEC_BACKSPACE:
1159 gfc_status ("BACKSPACE");
1163 gfc_status ("ENDFILE");
1167 gfc_status ("REWIND");
1170 fp = c->ext.filepos;
1174 gfc_status (" UNIT=");
1175 gfc_show_expr (fp->unit);
1179 gfc_status (" IOSTAT=");
1180 gfc_show_expr (fp->iostat);
1182 if (fp->err != NULL)
1183 gfc_status (" ERR=%d", fp->err->value);
1187 gfc_status ("INQUIRE");
1192 gfc_status (" UNIT=");
1193 gfc_show_expr (i->unit);
1197 gfc_status (" FILE=");
1198 gfc_show_expr (i->file);
1203 gfc_status (" IOSTAT=");
1204 gfc_show_expr (i->iostat);
1208 gfc_status (" EXIST=");
1209 gfc_show_expr (i->exist);
1213 gfc_status (" OPENED=");
1214 gfc_show_expr (i->opened);
1218 gfc_status (" NUMBER=");
1219 gfc_show_expr (i->number);
1223 gfc_status (" NAMED=");
1224 gfc_show_expr (i->named);
1228 gfc_status (" NAME=");
1229 gfc_show_expr (i->name);
1233 gfc_status (" ACCESS=");
1234 gfc_show_expr (i->access);
1238 gfc_status (" SEQUENTIAL=");
1239 gfc_show_expr (i->sequential);
1244 gfc_status (" DIRECT=");
1245 gfc_show_expr (i->direct);
1249 gfc_status (" FORM=");
1250 gfc_show_expr (i->form);
1254 gfc_status (" FORMATTED");
1255 gfc_show_expr (i->formatted);
1259 gfc_status (" UNFORMATTED=");
1260 gfc_show_expr (i->unformatted);
1264 gfc_status (" RECL=");
1265 gfc_show_expr (i->recl);
1269 gfc_status (" NEXTREC=");
1270 gfc_show_expr (i->nextrec);
1274 gfc_status (" BLANK=");
1275 gfc_show_expr (i->blank);
1279 gfc_status (" POSITION=");
1280 gfc_show_expr (i->position);
1284 gfc_status (" ACTION=");
1285 gfc_show_expr (i->action);
1289 gfc_status (" READ=");
1290 gfc_show_expr (i->read);
1294 gfc_status (" WRITE=");
1295 gfc_show_expr (i->write);
1299 gfc_status (" READWRITE=");
1300 gfc_show_expr (i->readwrite);
1304 gfc_status (" DELIM=");
1305 gfc_show_expr (i->delim);
1309 gfc_status (" PAD=");
1310 gfc_show_expr (i->pad);
1314 gfc_status (" ERR=%d", i->err->value);
1318 gfc_status ("IOLENGTH ");
1319 gfc_show_expr (c->expr);
1323 gfc_status ("READ");
1327 gfc_status ("WRITE");
1333 gfc_status (" UNIT=");
1334 gfc_show_expr (dt->io_unit);
1337 if (dt->format_expr)
1339 gfc_status (" FMT=");
1340 gfc_show_expr (dt->format_expr);
1343 if (dt->format_label != NULL)
1344 gfc_status (" FMT=%d", dt->format_label->value);
1346 gfc_status (" NML=%s", dt->namelist->name);
1349 gfc_status (" IOSTAT=");
1350 gfc_show_expr (dt->iostat);
1354 gfc_status (" SIZE=");
1355 gfc_show_expr (dt->size);
1359 gfc_status (" REC=");
1360 gfc_show_expr (dt->rec);
1364 gfc_status (" ADVANCE=");
1365 gfc_show_expr (dt->advance);
1371 gfc_status ("TRANSFER ");
1372 gfc_show_expr (c->expr);
1376 gfc_status ("DT_END");
1379 if (dt->err != NULL)
1380 gfc_status (" ERR=%d", dt->err->value);
1381 if (dt->end != NULL)
1382 gfc_status (" END=%d", dt->end->value);
1383 if (dt->eor != NULL)
1384 gfc_status (" EOR=%d", dt->eor->value);
1388 gfc_internal_error ("gfc_show_code_node(): Bad statement code");
1391 gfc_status_char ('\n');
1395 /* Show and equivalence chain. */
1398 gfc_show_equiv (gfc_equiv *eq)
1401 gfc_status ("Equivalence: ");
1404 gfc_show_expr (eq->expr);
1412 /* Show a freakin' whole namespace. */
1415 gfc_show_namespace (gfc_namespace * ns)
1417 gfc_interface *intr;
1418 gfc_namespace *save;
1419 gfc_intrinsic_op op;
1423 save = gfc_current_ns;
1427 gfc_status ("Namespace:");
1435 while (i < GFC_LETTERS - 1
1436 && gfc_compare_types(&ns->default_type[i+1],
1437 &ns->default_type[l]))
1441 gfc_status(" %c-%c: ", l+'A', i+'A');
1443 gfc_status(" %c: ", l+'A');
1445 gfc_show_typespec(&ns->default_type[l]);
1447 } while (i < GFC_LETTERS);
1449 if (ns->proc_name != NULL)
1452 gfc_status ("procedure name = %s", ns->proc_name->name);
1455 gfc_current_ns = ns;
1456 gfc_traverse_symtree (ns->common_root, show_common);
1458 gfc_traverse_symtree (ns->sym_root, show_symtree);
1460 for (op = GFC_INTRINSIC_BEGIN; op != GFC_INTRINSIC_END; op++)
1462 /* User operator interfaces */
1463 intr = ns->operator[op];
1468 gfc_status ("Operator interfaces for %s:", gfc_op2string (op));
1470 for (; intr; intr = intr->next)
1471 gfc_status (" %s", intr->sym->name);
1474 if (ns->uop_root != NULL)
1477 gfc_status ("User operators:\n");
1478 gfc_traverse_user_op (ns, show_uop);
1482 for (eq = ns->equiv; eq; eq = eq->next)
1483 gfc_show_equiv (eq);
1485 gfc_status_char ('\n');
1486 gfc_status_char ('\n');
1488 gfc_show_code (0, ns->code);
1490 for (ns = ns->contained; ns; ns = ns->sibling)
1493 gfc_status ("CONTAINS\n");
1494 gfc_show_namespace (ns);
1498 gfc_status_char ('\n');
1499 gfc_current_ns = save;