summaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-07 19:39:52 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-07 19:39:52 +0000
commit1a9745d21e1268a87f19cfda24155b849b8b11b2 (patch)
treee2633becc84e13a77c5ae809cc07bf460e685f59 /gcc/fortran/dump-parse-tree.c
parentccb16ec521709e9f7eac08426337a6ebe03bc3aa (diff)
downloadgcc-1a9745d21e1268a87f19cfda24155b849b8b11b2.tar.gz
2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
* decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c, convert.c: Update Copyright dates. Fix whitespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c110
1 files changed, 52 insertions, 58 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 17a7bf06052..6f2a6a74f8f 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1,5 +1,6 @@
/* Parse tree dumper
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Contributed by Steven Bosscher
This file is part of GCC.
@@ -40,7 +41,7 @@ static int show_level = 0;
/* Do indentation for a specific level. */
static inline void
-code_indent (int level, gfc_st_label * label)
+code_indent (int level, gfc_st_label *label)
{
int i;
@@ -68,9 +69,8 @@ show_indent (void)
/* Show type-specific information. */
void
-gfc_show_typespec (gfc_typespec * ts)
+gfc_show_typespec (gfc_typespec *ts)
{
-
gfc_status ("(%s ", gfc_basic_typename (ts->type));
switch (ts->type)
@@ -95,9 +95,8 @@ gfc_show_typespec (gfc_typespec * ts)
/* Show an actual argument list. */
void
-gfc_show_actual_arglist (gfc_actual_arglist * a)
+gfc_show_actual_arglist (gfc_actual_arglist *a)
{
-
gfc_status ("(");
for (; a; a = a->next)
@@ -122,7 +121,7 @@ gfc_show_actual_arglist (gfc_actual_arglist * a)
/* Show a gfc_array_spec array specification structure. */
void
-gfc_show_array_spec (gfc_array_spec * as)
+gfc_show_array_spec (gfc_array_spec *as)
{
const char *c;
int i;
@@ -144,8 +143,8 @@ gfc_show_array_spec (gfc_array_spec * as)
case AS_ASSUMED_SIZE: c = "AS_ASSUMED_SIZE"; break;
case AS_ASSUMED_SHAPE: c = "AS_ASSUMED_SHAPE"; break;
default:
- gfc_internal_error
- ("gfc_show_array_spec(): Unhandled array shape type.");
+ gfc_internal_error ("gfc_show_array_spec(): Unhandled array shape "
+ "type.");
}
gfc_status (" %s ", c);
@@ -233,9 +232,8 @@ gfc_show_array_ref (gfc_array_ref * ar)
/* Show a list of gfc_ref structures. */
void
-gfc_show_ref (gfc_ref * p)
+gfc_show_ref (gfc_ref *p)
{
-
for (; p; p = p->next)
switch (p->type)
{
@@ -264,9 +262,8 @@ gfc_show_ref (gfc_ref * p)
/* Display a constructor. Works recursively for array constructors. */
void
-gfc_show_constructor (gfc_constructor * c)
+gfc_show_constructor (gfc_constructor *c)
{
-
for (; c; c = c->next)
{
if (c->iterator == NULL)
@@ -297,7 +294,7 @@ gfc_show_constructor (gfc_constructor * c)
/* Show an expression. */
void
-gfc_show_expr (gfc_expr * p)
+gfc_show_expr (gfc_expr *p)
{
const char *c;
int i;
@@ -530,7 +527,7 @@ gfc_show_expr (gfc_expr * p)
whatever single bit attributes are present. */
void
-gfc_show_attr (symbol_attribute * attr)
+gfc_show_attr (symbol_attribute *attr)
{
gfc_status ("(%s %s %s %s", gfc_code2string (flavors, attr->flavor),
@@ -601,7 +598,7 @@ gfc_show_attr (symbol_attribute * attr)
/* Show components of a derived type. */
void
-gfc_show_components (gfc_symbol * sym)
+gfc_show_components (gfc_symbol *sym)
{
gfc_component *c;
@@ -628,7 +625,7 @@ gfc_show_components (gfc_symbol * sym)
that symbol. */
void
-gfc_show_symbol (gfc_symbol * sym)
+gfc_show_symbol (gfc_symbol *sym)
{
gfc_formal_arglist *formal;
gfc_interface *intr;
@@ -683,12 +680,12 @@ gfc_show_symbol (gfc_symbol * sym)
gfc_status ("Formal arglist:");
for (formal = sym->formal; formal; formal = formal->next)
- {
- if (formal->sym != NULL)
- gfc_status (" %s", formal->sym->name);
- else
- gfc_status (" [Alt Return]");
- }
+ {
+ if (formal->sym != NULL)
+ gfc_status (" %s", formal->sym->name);
+ else
+ gfc_status (" [Alt Return]");
+ }
}
if (sym->formal_ns)
@@ -706,7 +703,7 @@ gfc_show_symbol (gfc_symbol * sym)
and the name of the associated subroutine, really. */
static void
-show_uop (gfc_user_op * uop)
+show_uop (gfc_user_op *uop)
{
gfc_interface *intr;
@@ -721,9 +718,8 @@ show_uop (gfc_user_op * uop)
/* Workhorse function for traversing the user operator symtree. */
static void
-traverse_uop (gfc_symtree * st, void (*func) (gfc_user_op *))
+traverse_uop (gfc_symtree *st, void (*func) (gfc_user_op *))
{
-
if (st == NULL)
return;
@@ -737,9 +733,8 @@ traverse_uop (gfc_symtree * st, void (*func) (gfc_user_op *))
/* Traverse the tree of user operator nodes. */
void
-gfc_traverse_user_op (gfc_namespace * ns, void (*func) (gfc_user_op *))
+gfc_traverse_user_op (gfc_namespace *ns, void (*func) (gfc_user_op *))
{
-
traverse_uop (ns->uop_root, func);
}
@@ -747,7 +742,7 @@ gfc_traverse_user_op (gfc_namespace * ns, void (*func) (gfc_user_op *))
/* Function to display a common block. */
static void
-show_common (gfc_symtree * st)
+show_common (gfc_symtree *st)
{
gfc_symbol *s;
@@ -769,9 +764,8 @@ show_common (gfc_symtree * st)
/* Worker function to display the symbol tree. */
static void
-show_symtree (gfc_symtree * st)
+show_symtree (gfc_symtree *st)
{
-
show_indent ();
gfc_status ("symtree: %s Ambig %d", st->name, st->ambiguous);
@@ -786,15 +780,14 @@ show_symtree (gfc_symtree * st)
-static void gfc_show_code_node (int level, gfc_code * c);
+static void gfc_show_code_node (int, gfc_code *);
/* Show a list of code structures. Mutually recursive with
gfc_show_code_node(). */
void
-gfc_show_code (int level, gfc_code * c)
+gfc_show_code (int level, gfc_code *c)
{
-
for (; c; c = c->next)
gfc_show_code_node (level, c);
}
@@ -811,7 +804,7 @@ gfc_show_namelist (gfc_namelist *n)
if necessary. */
static void
-gfc_show_omp_node (int level, gfc_code * c)
+gfc_show_omp_node (int level, gfc_code *c)
{
gfc_omp_clauses *omp_clauses = NULL;
const char *name = NULL;
@@ -996,10 +989,11 @@ gfc_show_omp_node (int level, gfc_code * c)
gfc_status (" (%s)", c->ext.omp_name);
}
+
/* Show a single code node and everything underneath it if necessary. */
static void
-gfc_show_code_node (int level, gfc_code * c)
+gfc_show_code_node (int level, gfc_code *c)
{
gfc_forall_iterator *fa;
gfc_open *open;
@@ -1051,24 +1045,24 @@ gfc_show_code_node (int level, gfc_code * c)
case EXEC_GOTO:
gfc_status ("GOTO ");
if (c->label)
- gfc_status ("%d", c->label->value);
+ gfc_status ("%d", c->label->value);
else
- {
- gfc_show_expr (c->expr);
- d = c->block;
- if (d != NULL)
- {
- gfc_status (", (");
- for (; d; d = d ->block)
- {
- code_indent (level, d->label);
- if (d->block != NULL)
- gfc_status_char (',');
- else
- gfc_status_char (')');
- }
- }
- }
+ {
+ gfc_show_expr (c->expr);
+ d = c->block;
+ if (d != NULL)
+ {
+ gfc_status (", (");
+ for (; d; d = d ->block)
+ {
+ code_indent (level, d->label);
+ if (d->block != NULL)
+ gfc_status_char (',');
+ else
+ gfc_status_char (')');
+ }
+ }
+ }
break;
case EXEC_CALL:
@@ -1092,9 +1086,9 @@ gfc_show_code_node (int level, gfc_code * c)
gfc_status ("PAUSE ");
if (c->expr != NULL)
- gfc_show_expr (c->expr);
+ gfc_show_expr (c->expr);
else
- gfc_status ("%d", c->ext.stop_code);
+ gfc_status ("%d", c->ext.stop_code);
break;
@@ -1102,9 +1096,9 @@ gfc_show_code_node (int level, gfc_code * c)
gfc_status ("STOP ");
if (c->expr != NULL)
- gfc_show_expr (c->expr);
+ gfc_show_expr (c->expr);
else
- gfc_status ("%d", c->ext.stop_code);
+ gfc_status ("%d", c->ext.stop_code);
break;
@@ -1709,7 +1703,7 @@ gfc_show_equiv (gfc_equiv *eq)
/* Show a freakin' whole namespace. */
void
-gfc_show_namespace (gfc_namespace * ns)
+gfc_show_namespace (gfc_namespace *ns)
{
gfc_interface *intr;
gfc_namespace *save;