Commit 4fdf9c1e by Tobias Burnus

[multiple changes]

2013-05-28  Dominique d'Humieres  <dominiq@lps.ens.fr>

        PR fortran/57435
        * module.c (check_for_ambiguous): Avoid null pointer deref.

2013-05-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/57435

From-SVN: r199382
parent 0ba045df
2013-05-28 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/57435
* module.c (check_for_ambiguous): Avoid null pointer deref.
2013-05-28 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
......
......@@ -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);
......
2013-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/57435
* testsuite/gfortran.dg/use_29.f90: New.
2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/fp_exception.adb: New test.
......
! { dg-do compile }
!
! PR fortran/57435
!
! Contributed by Lorenz Hüdepohl
!
module precision
end module precision
contains
use precision ! { dg-error "Unexpected USE statement in CONTAINS section" }
module stressten_rt ! { dg-error "Unexpected MODULE statement in CONTAINS section" }
use precision ! { dg-error "Unexpected USE statement in CONTAINS section" }
implicit none ! { dg-error "Unexpected IMPLICIT NONE statement in CONTAINS section" }
! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
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