24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

-C Option<br />

Syntax<br />

-C<br />

CHECK | NOCHECK<br />

Checks each reference to an array element, array section, or character substring <strong>for</strong><br />

correctness.<br />

Rules<br />

At compile time, if the compiler can determine that a reference goes out of bounds,<br />

the severity of the error reported is increased to S (severe) when this option is<br />

specified.<br />

At run time, if a reference goes out of bounds, the program generates a SIGTRAP<br />

signal. By default, this signal ends the program and produces a core dump. This is<br />

expected behaviour and does not indicate there is a defect in the compiler product.<br />

Because the run-time checking can slow execution, you should decide which is the<br />

more important factor <strong>for</strong> each program: the per<strong>for</strong>mance impact or the possibility<br />

of incorrect results if an error goes undetected. You might decide to use this option<br />

only while testing and debugging a program (if per<strong>for</strong>mance is more important) or<br />

also <strong>for</strong> compiling the production version (if safety is more important).<br />

Related In<strong>for</strong>mation<br />

The -C option prevents some of the optimizations that the “-qhot Option” on page<br />

171 per<strong>for</strong>ms. You may want to remove the -C option after debugging of your code<br />

is complete and to add the -qhot option to achieve a more thorough optimization.<br />

The valid bounds <strong>for</strong> character substring expressions differ depending on the<br />

setting of the -qzerosize option. See “-qzerosize Option” on page 268.<br />

“-qsigtrap Option” on page 232 and “Installing an Exception Handler” on page 298<br />

describe how to detect and recover from SIGTRAP signals without ending the<br />

program.<br />

-qcheck is the long <strong>for</strong>m of -C.<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!