- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we have run into a problem with procedure pointers. The attached program works with
Intel Fortran 11 (both under Windows and Linux) and fails with Intel Fortran 12 (again
it fails on both platforms).
The program will crash at the statement:
call mh_callback(level)
Can anyone shed some light on this?
Regards,
Arjen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are passing procedure programError as an actual argument to SetMessageHandling which declares its argument as a procedure pointer. This is not legal in Fortran 2003 but is allowed in Fortran 2008. Unfortunately, our compiler does not yet support that properly and does the wrong thing. It was previously reported here and is fixed in a future version of the compiler.
I believe that the simple fix for you is to remove the "pointer" attribute from dummy argument "callback".
I believe that the simple fix for you is to remove the "pointer" attribute from dummy argument "callback".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
thanks. Remiving the pointer attribute does indeed seem to work. We were puzzled because it
did work with Intel Fortran 11 (but that version may simply ignore the pointer attribute).
Regards,
Arjen
thanks. Remiving the pointer attribute does indeed seem to work. We were puzzled because it
did work with Intel Fortran 11 (but that version may simply ignore the pointer attribute).
Regards,
Arjen

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