- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to Intel Fortran developers for improving the ability to detect uninitialized variables using the /check:uninit option. I prefer that when an uninitialized variable is used, a pop-up box not be created, with all messages instead being written to the console. I'd like a general option to avoid pop-up boxes in favor of console messages, since I do not want a program to require human intervention to terminate. I am compiling from the console using only the /check:uninit option, using W_FC_C_9.1.034.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the test case. Thanks for your help.
U:vraofortran>type xuninit.f90
subroutine un(i)
integer, intent(out) :: i
print*,"in un, i=",i
end subroutine un
program xuninit
implicit none
integer :: i,j
i = 2*i
print*,"i=",i
call un(i)
print*,"j=",j
end program xuninit
U:vraofortran>ifort /check:uninit xuninit.f90
Intel Fortran Compiler for 32-bit applications, Version 9.1 Build 20070109Z Package ID: W_FC_C_9.1.034
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
xuninit.f90(1) : Warning: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.
subroutine un(i)
--------------^
Microsoft Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
-out:xuninit.exe
-subsystem:console
xuninit.obj
U:vraofortran>xuninit.exe
console output:
forrtl: severe (193): run-time check failure. The variable 'XUNINIT$I' is being used without being defined.
Then, a pop-up with the message "xuninit.exe has encountered a problem and needs to close" appears.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, that popup is coming from Windows, not from Fortran, due to a raised error that is not dismissed. Apparently the RTL is signaling an error for this case. I note (and have been aware) that the behavior for array bounds errors is different - no signal is done. We have had customers ask for a signal so that they could catch it in an exception handler (in C).
I'm unsure what we can or should do here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I compile your test program using 9.1.032 in the Debug configuration and withRTC for Uninitialized variablesthen
a) Run from the IDE produces dump in the console window andthe anoying pop-up in lieu of Break at offending location.
b) Run from command line produces dump in the console windowbut No Pop-Up
Run on WinXP Pro
I would think, with a little bit of work the RTC check could determine if it were called while running in a Debug session. Probably easy to do if launched from the IDE but may be more difficult if attached to after starting from the command line. If while in Debug session then I think something like a return from single step (to call to RTC) for break.
Jim

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