Commit 5ea0d4df by Thomas Koenig

dump-parse-tree.c (debug): Implement for gfc_expr *, gfc_typespec *, gfc_typespec and gfc_symbol *.

2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

    * dump-parse-tree.c (debug): Implement for gfc_expr *,
    gfc_typespec *, gfc_typespec and gfc_symbol *.

From-SVN: r269071
parent 9e6644c6
2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (debug): Implement for gfc_expr *,
gfc_typespec *, gfc_typespec and gfc_symbol *.
2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/86119 PR fortran/86119
* class.c (gfc_get_len_component): Add argument k for kind. * class.c (gfc_get_len_component): Add argument k for kind.
If the kind of the resulting expression is not equal to k, If the kind of the resulting expression is not equal to k,
......
...@@ -48,11 +48,37 @@ static void show_expr (gfc_expr *p); ...@@ -48,11 +48,37 @@ static void show_expr (gfc_expr *p);
static void show_code_node (int, gfc_code *); static void show_code_node (int, gfc_code *);
static void show_namespace (gfc_namespace *ns); static void show_namespace (gfc_namespace *ns);
static void show_code (int, gfc_code *); static void show_code (int, gfc_code *);
static void show_symbol (gfc_symbol *);
static void show_typespec (gfc_typespec *);
/* Allow dumping of an expression in the debugger. */ /* Allow dumping of an expression in the debugger. */
void gfc_debug_expr (gfc_expr *); void gfc_debug_expr (gfc_expr *);
void debug (gfc_expr *e)
{
FILE *tmp = dumpfile;
dumpfile = stderr;
show_expr (e);
fputc (' ', dumpfile);
show_typespec (&e->ts);
fputc ('\n', dumpfile);
dumpfile = tmp;
}
void debug (gfc_typespec *ts)
{
FILE *tmp = dumpfile;
dumpfile = stderr;
show_typespec (ts);
fputc ('\n', dumpfile);
dumpfile = tmp;
}
void debug (gfc_typespec ts)
{
debug (&ts);
}
void void
gfc_debug_expr (gfc_expr *e) gfc_debug_expr (gfc_expr *e)
{ {
...@@ -76,6 +102,15 @@ gfc_debug_code (gfc_code *c) ...@@ -76,6 +102,15 @@ gfc_debug_code (gfc_code *c)
dumpfile = tmp; dumpfile = tmp;
} }
void debug (gfc_symbol *sym)
{
FILE *tmp = dumpfile;
dumpfile = stderr;
show_symbol (sym);
fputc ('\n', dumpfile);
dumpfile = tmp;
}
/* Do indentation for a specific level. */ /* Do indentation for a specific level. */
static inline void static inline void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment