APAR status
Closed as program error.
Error description
When compiling with optimization (-O3 and -qhot), a case in a switch/case statement is removed incorrectly. For example: switch(value) { case 1: rc = func(st); break; case 2: rc = func(st); break; case 4: rc = func(st); break; } , the '4' case is optimized away, and no code is run if value=4.
Local fix
Reduce optimization level
Problem summary
PROBLEM DESCRIPTION: A valid switch/case execution path is incorrectly determined to never be used, and is removed during code optimization. USERS AFFECTED: Users compiling code at -O3
Problem conclusion
The bad code optimization was corrected and the switch code is now generated correctly.
Temporary fix
Comments
APAR Information
APAR number
IJ24658
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
G10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2020-04-30
Closed date
2020-04-30
Last modified date
2020-04-30
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
22 August 2024