A fix is available
APAR status
Closed as program error.
Error description
When compiling at -O2, the resulting binary does not throw a floating point exception at runtime. We seem to be pre-computing a value and then printing it out during runtime. ===== TESTCASE: $ cat overflow2.cpp #include <stdio.h> int main (int argc, char* argv); int main (int argc, char* argv) { double f = 2.82e+41; printf("f is %f\n", f); fflush(stdout); f *= f; // Expect to get HFP exponent overflow here printf("f is %f\n", f); fflush(stdout); return 0; } $ ===== ACTUAL OUTPUT: $ ./overflow2opt1 f is 282000000000000000000000000000000000000000.000000 f is 0.000000 ===== EXPECTED OUTPUT: $ ./overflow2opt0 f is 282000000000000000000000000000000000000000.000000 CEE3212S The system detected an exponent-overflow exception (System Completion Code=0CC). From entry point main at compile unit offset +00000070 at entry offset +00000070 at address 2540A190. [1] + Done(136) ./overflow2opt0 83889146 Floating point exception ./overflow2opt0 $
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: zOS C/C++ compiler users using hexadecimal * * floating point format in programs that may * * trigger floating point exceptions. * **************************************************************** * PROBLEM DESCRIPTION: Failure to generate floating point * * overflow exception when optimization * * is performed. * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
Apply provided service.
Temporary fix
Comments
APAR Information
APAR number
PI50490
Reported component name
C/C++ FOR MVS
Reported component ID
56551210A
Reported release
791
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-10-13
Closed date
2015-10-14
Last modified date
2016-06-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI32071
Modules/Macros
CCNECICS CCNECWI CCNEDSCT CCNEDWRT CCNED211 CCNEFILT CCNEHIFC CCNEMDEP CCNEOPTP CCNEP CCNEPP CCNETBY CCNMSGE CCNMSGT
Fix information
Fixed component name
C/C++ FOR MVS
Fixed component ID
56551210A
Applicable component levels
R791 PSY UI32071
UP15/11/21 P F511
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":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSQKCWV","label":"IBM C\/C++ for MVS\/ESA"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
22 August 2024