Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

/warn documentation

HarmenW
Novice
279 Views

I have three questions regarding the following documentation https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-2/warn.html.

 

  1. The [no]ignore_bounds option is listed here. It is not listed in the command line help (ifort /help or ifx /help), and when I use /warn:ignore_bounds I receive "command line error: Unrecognized keyword 'ignore_bounds' for option '/warn'." Does this option exist, or is it only a /check option?
  2. [no]ignore_loc is described as "Determines whether warnings occur when %LOC is stripped from an actual argument." Could someone provide a code sample that will trigger this warning?
  3. Does noignore_loc mean that it will warn or that it will not warn? The description says that "No warnings are issued when %LOC is stripped from an argument", but this is inconsistent with the description for noignore_bounds, which says "The compiler checks array references with constant subscripts and warns if the reference is to an element outside the declared bounds of the array."
0 Kudos
1 Solution
Ron_Green
Moderator
133 Views

I had a look at ignore_bounds and compile time bounds checking.  It is still in the compiler and active.  So it appears our driver, named ifx, may have a bug.  The developer for the ifx driver is out on vacation this past week.  I will contact him and get this bug addressed.  The documentation is correct, the compiler is able to handle it, it's just that the driver is not accepting the option/keyword pair.

View solution in original post

3 Replies
Ron_Green
Moderator
241 Views

I'll have to check on ignore_bounds.  Could be a leftover from Digital days or before we moved bounds checking to runtime checks. 

options or keywords with "no" are the negation of the option or keyword.  if the option is ignoring something, this says to not ignore it.  This is a long-standing practice for our compiler options.

In the case of ignore_loc, the wording of the keyword ignore_loc is less than ideal.  ignore_loc is really saying that if the compiler is stripping the %LOC from an argument list, give us a warning.  no is the opposite, which is to say silently strip the %LOC and don't warn us about it.  If I read this correctly.   I'll have to research this one.  I am sure it is from the days when mixed language programming would have to pass the address of an object instead of the object - in the dark days before ISO_C_BINDING, using %LOC.  I'm sure there is still a lot of legacy code doing this and worse.  I will have to dig up the origin of this warning.  I am sure there was some use case where it was necessary.  Unfortunately the background story on this warning may only exist in the memories held by our retirees.  

 

HarmenW
Novice
187 Views

Hi Ron, thank you for your quick and thorough response. It would be nice if the /warn:ignore_bounds documentation could be updated (removed) if it turns out not to exist.

And good to know that ignore_loc turns on the warning, your explanation makes sense.

0 Kudos
Ron_Green
Moderator
134 Views

I had a look at ignore_bounds and compile time bounds checking.  It is still in the compiler and active.  So it appears our driver, named ifx, may have a bug.  The developer for the ifx driver is out on vacation this past week.  I will contact him and get this bug addressed.  The documentation is correct, the compiler is able to handle it, it's just that the driver is not accepting the option/keyword pair.

Reply