Software Archive
Read-only legacy content
17061 Discussions

pointer in a type which point to the type itself

lucaletizia
Beginner
277 Views
Hi guys,

look at the following code

module my_type 
implicit none 
type mytype 
    real			::  a 
    type(mytype), pointer   ::	left_mytype 
   type(mytype), pointer   :: 	right_mytype 
end type 
contains 
subroutine check_pointer(firsttype) 
implicit none 
type(mytype)		::   firsttype 
 
end subroutine check_pointer 
end module 
 
and the main program is : 
program debug 
use my_type 
implicit none 
type(mytype), target		::	type1 
type(mytype), target		::	type2 
type(mytype), target		::	type3 
type1%left_mytype => type2 
type2%left_mytype => type3 
type3%right_mytype => type2 
type2%right_mytype => type1 
call check_pointer(type1) 
end 


If I debug the code in the main program I can see the values of the pointers (for type1 for instance) %right_mytype and %left_mytype, but when I go in the check_pointers subroutine the debug windows is telling me that the value for the pointers is "invalid debug information", is it a bug in the debbuger ?

do you know any way to actually see the values in the debug window ?

Thanks Luca
0 Kudos
0 Replies
Reply