A fix is available
APAR status
Closed as program error.
Error description
When compiling test case with -O3 and -qpdf1, the compiler generates an executable that contains a infinite loop, which causes it to hang. . $ xlC -O3 -qpdf1 t2.cpp 19 1500-010: (W) WARNING in main: Infinite loop. Program may not stop. $ a.out [hangs] . Following the logistics of the test case, there should not be any infinite loops. This may be caused by incorrect code rearrangement during the optimization phase. . This problem seems to during in -O2 as well. . I did not run the program through any debuggers because it involves optimization. . ENVIRONMENT: ------------ AIX4L,5L VAC++ 600 . TESTCASE: --------- // test.cpp #define FALSE 0 #define TRUE 1 . int main(void) { int status; . if ( FALSE ) do { printf("Should not be here\n"); } while ( *(&status) == 0 && 1 ); . if ( FALSE ) ; else if ( TRUE ) { do_again: printf("You are in else-if block\n"); if ( FALSE ) goto do_again; } if ( FALSE ) goto do_again; . printf("Exit from the function\n"); return(0); . } . COMPILE COMMAND: ---------------- xlC -O3 -qpdf1 test.cpp . WORKAROUND: ----------- Don't compile with -O3 and -qpdf1 together. . EXPECTED RESULTS: ----------------- Clean compile without warning message. An executable without infinite loops. . ACTUAL RESULTS: --------------- 19 1500-010: (W) WARNING in main: Infinite loop. Program may not stop. An executable that hangs.
Local fix
Don't compile with -O3 and -qpdf1 together.
Problem summary
Same as submitter's text.
Problem conclusion
Development checked in a fix that resolved customer's problem.
Temporary fix
Comments
APAR Information
APAR number
IY39852
Reported component name
XL FORTRAN AIX
Reported component ID
5765F7000
Reported release
810
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2003-01-29
Closed date
2003-01-29
Last modified date
2004-11-05
APAR is sysrouted FROM one or more of the following:
IY36719
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL FORTRAN AIX
Fixed component ID
5765F7000
Applicable component levels
R810 PSN U487189
UP03/02/13 I 1000
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSB24Z","label":"XL Fortran Enterprise Edition for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
20 August 2024