[Bug fortran/37253] New: Segmentation fault with procedure pointer
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Wed Aug 27 10:51:00 GMT 2008
The following code
module myMod
CONTAINS
real function proc3( arg1 )
integer :: arg1
proc3 = arg1+7
end function proc3
subroutine proc4( arg1 )
procedure(real), pointer :: arg1
print*, 'the func: ', arg1(0)
end subroutine proc4
end module myMod
program myProg
use myMod
PROCEDURE (real), POINTER :: p => NULL()
p => proc3
print*, 'the func: ', p(0)
call proc4( p )
end program myProg
gives a segmentation fault at run time:
[ibook-dhum] f90/bug% a.out
the func: 7.0000000
Segmentation fault
--
Summary: Segmentation fault with procedure pointer
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253
More information about the Gcc-bugs
mailing list