mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-18 18:51:24 +08:00
re PR fortran/46849 ([OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE)
2010-12-17 Janus Weil <janus@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/46849 * resolve.c (resolve_symbol): Remove symbols that wrongly ended up in a local BLOCK namespace. 2010-12-17 Janus Weil <janus@gcc.gnu.org> PR fortran/46849 * gfortran.dg/block_9.f08: New. Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org> From-SVN: r167978
This commit is contained in:
parent
eab89c86a2
commit
7ca1703338
@ -1,3 +1,10 @@
|
||||
2010-12-17 Janus Weil <janus@gcc.gnu.org>
|
||||
Tobias Burnus <burnus@gcc.gnu.org>
|
||||
|
||||
PR fortran/46849
|
||||
* resolve.c (resolve_symbol): Remove symbols that wrongly ended up
|
||||
in a local BLOCK namespace.
|
||||
|
||||
2010-12-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/46945
|
||||
|
@ -11784,7 +11784,9 @@ resolve_symbol (gfc_symbol *sym)
|
||||
for (ns = gfc_current_ns->parent; ns; ns = ns->parent)
|
||||
{
|
||||
symtree = gfc_find_symtree (ns->sym_root, sym->name);
|
||||
if (symtree && symtree->n.sym->generic)
|
||||
if (symtree && (symtree->n.sym->generic ||
|
||||
(symtree->n.sym->attr.flavor == FL_PROCEDURE
|
||||
&& sym->ns->construct_entities)))
|
||||
{
|
||||
this_symtree = gfc_find_symtree (gfc_current_ns->sym_root,
|
||||
sym->name);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-12-17 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/46849
|
||||
* gfortran.dg/block_9.f08: New.
|
||||
|
||||
2010-12-17 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
* g++.dg/debug/dwarf2/self-ref-1.C: New test.
|
||||
|
23
gcc/testsuite/gfortran.dg/block_9.f08
Normal file
23
gcc/testsuite/gfortran.dg/block_9.f08
Normal file
@ -0,0 +1,23 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 46849: [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE
|
||||
!
|
||||
! Contributed by Reinhold Bader <bader@lrz.de>
|
||||
|
||||
implicit none
|
||||
|
||||
block
|
||||
call init(fun)
|
||||
end block
|
||||
|
||||
contains
|
||||
|
||||
subroutine init(func)
|
||||
real, external :: func
|
||||
end subroutine
|
||||
|
||||
real function fun()
|
||||
fun = 1.1
|
||||
end function
|
||||
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user