forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

More allocation/pointer problems in 5.20.1

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Thu Apr 10, 2008 6:12 pm    Post subject: More allocation/pointer problems in 5.20.1 Reply with quote

I have an dynamic array of integers implemented within an ADT as a pointer:

type ADT
integer:: ntiles
integer, pointer:: tilerefs(Smile => NULL()
end type ADT

I have a fixed array of these things:

type(ADT):: adtarray(10)

And I allocate and fill the tilerefs array within a loop using:

adtarray(i)%ntiles = 6 ! array size varies
allocate(adtarray(i)%tilerefs(adtarray(i)%ntiles))

This is where everything goes potty. For the first iteration it sometimes seems okay, then later on at some point some other data in my ADT is corrupted. In addition, if I break at the point just AFTER the allocation and watch adtarray, the tileref entry is shown as:

tilerefs Unassigned(INTEGER*4(6))

While array size is the correct value, the Unassigned is not good. If I compile with 5.10 or earlier then everything works as it should and the debugger shows:

tilerefs INTEGER*4(6)

I haven't tried this out on a small program (need to get on with other stuff), but I guess this may be another incarnation of the problems others are seeing.

All tests done on XP with v 5.20.1 on VS2005 and VS2008
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group