- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to have visual studio (2012) break on intel fortran run time warnings like:
forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument #2
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the current version, no. In version 15, coming out later this year, yes, by using the new library routine ESTABLISHQQ to establish a run-time handler for Fortran errors. You could then do something like this:
use ifestablish integer array(50) procedure(establishqq_handler) :: handler integer (int_ptr_kind()) :: context logical :: ret ret = establishqq(handler, context) array = 1 call sub (array(1:49:2)) print *, array end subroutine sub (a) integer a(*) do i=1,25 a(i) = 2 * i end do end subroutine sub function handler (error_code, continuable, message_string, context) use kernel32 use foriosdef implicit none logical :: handler ! Arguments ! integer, intent(in) :: error_code ! RTL error code from IOSTAT table logical, intent(in) :: continuable ! True if condition is continuable character(*), intent(in) :: message_string ! Formatted message string a la ERRMSG/IOMSG integer, intent(in) :: context ! Address-sized integer as passed in to call to ESTABLISHQQ ! For whatever purpose the programmer desires. handler = .TRUE. ! Continue by default if (error_code == FOR$IOS_WARN_TBACK) then ! Runtime warning with traceback print *, message_string if (IsDebuggerPresent() /= 0) call DebugBreak ! Break into debugger end if end function handler

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