- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another nerve-racking issue trying to get a F2003 test code up and running. I'm using ComposerXE 2011.sp1.9.293. I'm working with some test code with linked lists, which I was finally able to compile after working through some yet to be fixed compiler bugs. Anyway, now I'm running into a problem where a pointer that points to a null value returns that it is associated. For instance:
associated(this%next) returns false
curr => this%next
associated(curr) returns true
I've printed out the loc() results for both this%next and curr variables and they both point to '0' so I'm at a loss why associated(curr) returns true. Unfortunately, a simple test code always works and this seems to be an artifact of possibly another bug, so I've included all the source code. The error occurs at line 63 of link.f90. I'm using standard compiler options:
ifort -o LnkTst link.f90 list.f90 main.f90
Running LnkTst always produces a segmentation fault because associated(curr) returns true. I know how to work around this (just do an associated(this%next) instead) but I'm pretty sure that this problem is indicative of an error somewhere else. Usually, I start printing out pointer addresses to make sure I didn't inadvertantly change pointer locations, but when I attempt to print addresses for the 'this' pointer, I always get some huge value rather than the standard 4 bit integer. Next step is to try and debug with valgrind and see if that helps.
Anyway, here is the source code for all three files. Any help would be appreciated.
Thanks,
John
associated(this%next) returns false
curr => this%next
associated(curr) returns true
I've printed out the loc() results for both this%next and curr variables and they both point to '0' so I'm at a loss why associated(curr) returns true. Unfortunately, a simple test code always works and this seems to be an artifact of possibly another bug, so I've included all the source code. The error occurs at line 63 of link.f90. I'm using standard compiler options:
ifort -o LnkTst link.f90 list.f90 main.f90
Running LnkTst always produces a segmentation fault because associated(curr) returns true. I know how to work around this (just do an associated(this%next) instead) but I'm pretty sure that this problem is indicative of an error somewhere else. Usually, I start printing out pointer addresses to make sure I didn't inadvertantly change pointer locations, but when I attempt to print addresses for the 'this' pointer, I always get some huge value rather than the standard 4 bit integer. Next step is to try and debug with valgrind and see if that helps.
Anyway, here is the source code for all three files. Any help would be appreciated.
Thanks,
John
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As a side note, I was able to get this code to work with no problems using PGI compiler v12.2
John
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I have seen this before - let me take a look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is apparently a different twist on a problem we fixed. I have escalated it as issue DPD200179858. If you test on associated(this%next), the program will run. Thanks for bringing this to our attention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a release later this year.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page