This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2009 17:07:08 -0000
- Subject: [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program fails with:
procedure(sub), pointer :: pptr2
1
Error: Interface 'sub' of procedure 'pptr2' at (1) must be explicit
The question is whether it is valid or not. As both NAG f95 and ifort reject it
(g95 accepts it), it might be invalid.
However, if one uncomments pptr1: gfortran, NAG f95 and g95 accept pptr1 and
pptr2 -- while ifort continues to reject pptr2 only. Thus it might be valid at
the end.
program main
! procedure(sub), pointer :: pptr1
! nullify (pptr1)
contains
subroutine test()
procedure(sub), pointer :: pptr2
nullify (pptr2)
end subroutine test
subroutine sub()
end subroutine sub
end program main
--
Summary: Procedure(interface): Rejected if interface is
indirectly hostassociated
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40591