Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Bugs of CVF's debugger?

Zhanghong_T_
Novice
367 Views
Dear all,
Here I have a simple project. There is no error when linked. But when I debug it(execute to the function "create"), the complier tells me the following message, can anyone tell me why?
The code is as follows:
module mypointer
type vertex
real x,y
endtype
type point
type(vertex)coord
integer nbr
endtype
type ppoint
type(point), pointer::p=>null()
endtype
type facet
real a,b,c,d
type(ppoint)ep(1:2)
integer nbr
endtype
type halffacet
type(halffacet), pointer::left=>null(), right=>null()
type(facet), pointer::hfacet=>null()
type(point), pointer::hpoint=>null()
real start
type(halffacet),pointer::next
endtype
type(halffacet),pointer:: leftend=>null(), rightend=>null()
integer hsize
type(halffacet),pointer::Eh(
integer npoint
contains
function create()result(out)
type(halffacet),pointer::out,current
out=>null()
ndepth=0
do
if(ndepth>npoint)exit
allocate(current)
current%left=>out
out=>current
ndepth=ndepth+1
enddo
end function
subroutine initialize()
type(halffacet), pointer::temp(
if(associated(Eh))deallocate(Eh)
hsize = 2 * npoint
allocate(Eh(0:hsize-1))
temp=>Eh
leftend => create( )
rightend => create( )
leftend%left =>NULL()
leftend%right => rightend
rightend%left => leftend
rightend%right =>NULL()
Eh(0) = leftend
Eh(hsize-1) = rightend
end subroutine

endmodule
program pointertest
use mypointer
npoint=10
call initialize
end program pointertest
0 Kudos
0 Replies
Reply