Technote (troubleshooting)
Problem(Abstract)
Attempts to run a binary built with -O4 (or higher) using XL C/C++ compiler may fail with an illegal instruction at run time on a machine other than the build machine.
Cause
The compiler automatically uses the -qarch=auto suboption when you compile at -O4 or -O5, and it assumes that your compilation machine and your target execution machine are the same.
Resolving the problem
If you compile on a POWER5-based system and specify -O4, the default setting for -qarch is set to PWR5.
If the compilation machine is newer than the target machine, the generated binary may contain instruction sets that are not present on the target machine, which will result in an illegal instruction at run time.
You can override this behavior by specifying the -qarch option after the -O4 or -O5 compiler option.
| Segment | Product | Component | Platform | Version | Edition |
|---|---|---|---|---|---|
| Software Development | XL C for AIX | Compiler | AIX | All Versions | Not Applicable |
| Software Development | XL Fortran for AIX | Compiler | AIX | All Versions | Not Applicable |
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.