Specifications
50 Troubleshooting and Portability Issues Chapter 4
32035 Rev. 3.22 November 2007
Compiler Usage Guidelines for AMD64 Platforms
By default, GCC enables the -fexceptions option for languages like C++ that normally require
exception handling. GCC disables the -fexceptions option for languages like C that do not normally
require it. You may need, however, to enable this option when compiling C code that must
interoperate properly with exception handlers written in C++. You may also wish to disable this
option if you are compiling older C++ programs that do not use exception handling.
4.9 Intel Compilers (32-Bit) for Linux
®
This section addresses errors and unexpected results that may be encountered when using 32-bit Intel
compilers for Linux®.
4.9.1 Compilation Errors
Are you using the right ANSI-compliant switch?
Use the -ansi-alias- switch to compile Fortran programs that do not adhere to the ANSI Fortran-type
alias rules.
4.9.2 Link-Time Errors
Are you trying to link C and Fortran code?
If you are linking C and Fortran modules, and the link-time error is due to a mismatch of symbol
names, use the -us switch with the Intel Fortran compiler. Using the -us switch appends an underscore
to the symbol names derived from external variables or functions, causing them to match the C
symbols.
4.9.3 Compiled and Linked Code Generates Unexpected Results
Are you generating vectorized floating-point code?
For some loops, vectorization can cause a slight difference in results due to the reordering of floating-
point operations. The switches -xK and -xW vectorize loops where possible. As a diagnostic step, try
compiling without these switches.
Does your program rely on some x87 features?
Some Intel compiler switches instruct the compiler to use SSE2 registers and instructions. If the
results of a program do not match your expectations when using SSE2 registers and instructions, the
program may rely on some x87 features.
As a diagnostic step, try building the program using x87 operations for floating-point computations,
and see if the results are as expected. Not using the -xK and -xW switches recommended in the
general performance guidelines causes the compiler to build the program using x87 operations for
floating-point computations.