Message ID | 53cafe9a-ad5c-7c92-4307-c7b1e6fb5cb3@netcologne.de |
---|---|
State | New |
Headers | show |
Series | [Fortran,committed] Fix a crash with a developer's option | expand |
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index f32330685e7..f44648879f5 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -3595,5 +3595,8 @@ show_global_symbol (gfc_gsymbol *gsym, void *f_data) void gfc_dump_global_symbols (FILE *f) { - gfc_traverse_gsymbol (gfc_gsym_root, show_global_symbol, (void *) f); + if (gfc_gsym_root == NULL) + fprintf (f, "empty\n"); + else + gfc_traverse_gsymbol (gfc_gsym_root, show_global_symbol, (void *) f); }