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
This commit is contained in:
parent
0de27aacb6
commit
9439ae414f
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
18
gcc/testsuite/gfortran.dg/nesting_1.f90
Normal file
18
gcc/testsuite/gfortran.dg/nesting_1.f90
Normal file
@ -0,0 +1,18 @@
|
||||
! 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
|
Loading…
Reference in New Issue
Block a user