A fix is available
APAR status
Closed as program error.
Error description
When the optimizer encountered an if condition it could evaluate at compile time, it incorrectly discarded code based on that evaluation although the if condition involved a volatile item. The contract for volatile items is that such an item "is loaded from memory each time it is referenced", which should prevent the optimizer from doing compile time evaluation of expressions involving such items and discarding code dependent on such a compile time evaluation.
Local fix
Compile at OPT(0)
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL V5.2 compiling * * programs with OPT(1|2) and then running * * them. The programs assign a value to a * * VOLATILE data item (e.g. a data item used in * * a check that prevents a CALL statement from * * ever being executed, but prevents the * * optimizer from removing the CALL statement, * * forcing the called program to be resolved by * * the binder.) * * * **************************************************************** * PROBLEM DESCRIPTION: Incorrect output at runtime: The * * optimizer may replace a load of the * * VOLATILE item with its assigned value * * instead of loading the data item from * * memory. * * * **************************************************************** * RECOMMENDATION: Apply provided service. * **************************************************************** The compiler has an optimization that looks for values assigned to a data item and replaces loads of that item with the assigned value. That optimization wasn't checking if the item was marked VOLATILE.
Problem conclusion
The compiler optimizer was fixed to correctly avoid optimization for data items with the VOLATILE attribute.
Temporary fix
Comments
APAR Information
APAR number
PI54409
Reported component name
ENT COBOL FOR Z
Reported component ID
5655W3200
Reported release
520
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-12-17
Closed date
2016-01-22
Last modified date
2016-02-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
IGYCBE
Fix information
Fixed component name
ENT COBOL FOR Z
Fixed component ID
5655W3200
Applicable component levels
R520 PSY UI34689
UP16/01/28 P F601
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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"520","Edition":"","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}},{"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":"520","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
01 February 2016