Commit 9439ae41 by Tobias Schlüter

re PR fortran/18525 (ICE on valid code in gfc_get_symbol_decl())

fortran/
* dump-parse-tree.c (gfc_show_expr): Dump name of namespace
in which the variable is declared.

PR fortran/18525
* resolve.c (was_declared): Also check for dummy attribute.

testsuite/
PR fortran/18525
* gfortran.dg/nesting_1.f90: New test.

From-SVN: r96739
parent 0de27aac
2005-03-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* dump-parse-tree.c (gfc_show_expr): Dump name of namespace
in which the variable is declared.
PR fortran/18525
* resolve.c (was_declared): Also check for dummy attribute.
2005-03-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.h (arith): Remove ARITH_0TO0.
* arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
(gfc_arith_power): Remove special casing of zero to integral
......
......@@ -409,6 +409,8 @@ gfc_show_expr (gfc_expr * p)
break;
case EXPR_VARIABLE:
if (p->symtree->n.sym->ns && p->symtree->n.sym->ns->proc_name)
gfc_status ("%s:", p->symtree->n.sym->ns->proc_name->name);
gfc_status ("%s", p->symtree->n.sym->name);
gfc_show_ref (p->ref);
break;
......
......@@ -481,7 +481,7 @@ was_declared (gfc_symbol * sym)
if (!a.implicit_type && sym->ts.type != BT_UNKNOWN)
return 1;
if (a.allocatable || a.dimension || a.external || a.intrinsic
if (a.allocatable || a.dimension || a.dummy || a.external || a.intrinsic
|| a.optional || a.pointer || a.save || a.target
|| a.access != ACCESS_UNKNOWN || a.intent != INTENT_UNKNOWN)
return 1;
......
2005-03-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/18525
* gfortran.dg/nesting_1.f90: New test.
2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/20240
......
! PR 18525
! we used to incorrectly refer to n from a when resolving the call to
! c from b
! { dg-do run }
subroutine a(n)
call b(n+1)
contains
subroutine b(n)
call c(n)
end subroutine b
subroutine c(m)
if (m/=1) call abort
end subroutine c
end subroutine a
call a(0)
end
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