mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 22:21:23 +08:00
dump_parse_tree (debug): Add verison for formal arglist.
2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org> * dump_parse_tree (debug): Add verison for formal arglist. Do not crash when a gfc_expr is NULL. From-SVN: r272353
This commit is contained in:
parent
5767d76f8f
commit
2d86d75105
@ -1,3 +1,8 @@
|
||||
2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
* dump_parse_tree (debug): Add verison for formal arglist.
|
||||
Do not crash when a gfc_expr is NULL.
|
||||
|
||||
2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
* decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
|
||||
|
@ -66,6 +66,19 @@ void debug (symbol_attribute *attr)
|
||||
dumpfile = tmp;
|
||||
}
|
||||
|
||||
void debug (gfc_formal_arglist *formal)
|
||||
{
|
||||
FILE *tmp = dumpfile;
|
||||
dumpfile = stderr;
|
||||
for (; formal; formal = formal->next)
|
||||
{
|
||||
fputc ('\n', dumpfile);
|
||||
show_symbol (formal->sym);
|
||||
}
|
||||
fputc ('\n', dumpfile);
|
||||
dumpfile = tmp;
|
||||
}
|
||||
|
||||
void debug (symbol_attribute attr)
|
||||
{
|
||||
debug (&attr);
|
||||
@ -75,9 +88,15 @@ void debug (gfc_expr *e)
|
||||
{
|
||||
FILE *tmp = dumpfile;
|
||||
dumpfile = stderr;
|
||||
show_expr (e);
|
||||
fputc (' ', dumpfile);
|
||||
show_typespec (&e->ts);
|
||||
if (e != NULL)
|
||||
{
|
||||
show_expr (e);
|
||||
fputc (' ', dumpfile);
|
||||
show_typespec (&e->ts);
|
||||
}
|
||||
else
|
||||
fputs ("() ", dumpfile);
|
||||
|
||||
fputc ('\n', dumpfile);
|
||||
dumpfile = tmp;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user