This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52585] New: Dummy procedure pointer loses its pointer association status
- From: "mathewc at nag dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Mar 2012 13:24:16 +0000
- Subject: [Bug fortran/52585] New: Dummy procedure pointer loses its pointer association status
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52585
Bug #: 52585
Summary: Dummy procedure pointer loses its pointer association
status
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mathewc@nag.co.uk
$ uname -a
Linux stonehenge 3.2.9-2.fc16.x86_64 #1 SMP Mon Mar 5 20:55:39 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux
$ gfortran --version
GNU Fortran (GCC) 4.8.0 20120314 (experimental) [trunk revision 185372]
$ cat p_assoc.f90
module m0
abstract interface
subroutine sub
end subroutine sub
end interface
interface
subroutine s(ss)
import sub
procedure(sub), pointer, intent(in) :: ss
end subroutine s
end interface
end module m0
use m0, only : sub, s
procedure(sub) :: sub2, pp
pointer :: pp
pp => sub2
if (.not. associated(pp,sub2)) stop 'FAIL'
call s(pp)
end
subroutine s(ss)
use m0, only : sub
procedure(sub), pointer, intent(in) :: ss
procedure(sub) :: sub2
if (.not. associated(ss,sub2)) stop 'FAIL2'
end subroutine s
subroutine sub2
end subroutine sub2
$ gfortran p_assoc.f90 ; ./a.out
STOP FAIL2