From 4fdf9c1ec0cc0be111e5d22d4da1cfa36a384c42 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 28 May 2013 17:18:14 +0200 Subject: [multiple changes] 2013-05-28 Dominique d'Humieres PR fortran/57435 * module.c (check_for_ambiguous): Avoid null pointer deref. 2013-05-28 Tobias Burnus PR fortran/57435 From-SVN: r199382 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/module.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4ebdf3c..a8116b0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2013-05-28 Dominique d'Humieres + + PR fortran/57435 + * module.c (check_for_ambiguous): Avoid null pointer deref. + 2013-05-28 Janus Weil Tobias Burnus diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index e6a4cd7..bc31671 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4532,7 +4532,7 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) module_locus locus; symbol_attribute attr; - if (st_sym->name == gfc_current_ns->proc_name->name) + if (gfc_current_ns->proc_name && st_sym->name == gfc_current_ns->proc_name->name) { gfc_error ("'%s' of module '%s', imported at %C, is also the name of the " "current program unit", st_sym->name, module_name); -- cgit v1.1