IBM Support

PH69975: INCORRECT ASM GENERATION FOR BUILT-IN TROT INSTRUCTION MASK PARAMETER

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The compiler is generating incorrect assembly code for the TROT
    instruction built-in (https://www.ibm.com/docs/en/zos/3.2.0?top
    ic=functions-general-instructions)when compiling in Metal C mode
    
         TRANSLATE ONE TO TWO
          int __trot(unsigned short *OP1, char *OP2, unsigned long
    op2_len, char *tr_table, unsigned short test_char, unsigned char
    mask)
    
    The 'mask' parameter controls the Test-Character-Comparison
    Control bit of the M[3] operand of the instruction.  When
    compiling with Metal C, the instruction is generated with a
    value of B'1111' for both mask=0 and mask=1 cases.  The value
    should be B'0000' or B'0001', respectively.
    
    When compiling outside of Metal C, the generated code is
    correct, however ASM listings do not display the M[3] operand:
    
    mask=0  ==>   00012E  B992  00E2        000011 |
      TROT     r14,r2
    mask=1  ==>   000164  B992  10E2        000018 |
      TROT     r14,r2
    

Local fix

  • Manually modify the generated Metal C assembly code.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of IBM z/OS V2.4 XL C/C++              *
    *                 with the METAL option and source code that   *
    *                 makes use of the Translate class of          *
    *                 built-ins (__trot/                           *
    *                 __troo/__trto/__trtt).                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: The compiler may generate an            *
    *                      invalid mask field for the translate    *
    *                      instruction                             *
    *                      based on the builtin used               *
    *                      (TROT/TROO/TRTO/TRTT).                  *
    ****************************************************************
    * RECOMMENDATION: Install the PTF                              *
    ****************************************************************
    N/A
    

Problem conclusion

  • Install the PTF
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH69975

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7C0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2026-02-04

  • Closed date

    2026-03-27

  • Last modified date

    2026-05-02

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UO07332

Modules/Macros

  • CCNECICS CCNECWI  CCNED240 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C0 PSY UO07332

       UP26/04/23 P F604

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":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7C0","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
02 May 2026