A fix is available
APAR status
Closed as program error.
Error description
When compiling with V2R1 and LP64, the following test case shows how the compmiler generates incorrect code gen when using __attribute__((amode31)): ===== COMPILE COMMAND: xlc -Wc,"METAL,LONG,LP64" -S test.c -I/usr/include/metal ===== TESTCASE: $ cat test.c #include <metal.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdarg.h> #include <ctype.h> typedef int(* __ptr32 a31)(char *, ...) __attribute__((amode31)); int main(int argc, char **argv) { a31 * __ptr32 a31_ptr = 0; char c1[32]; char c2[32]; int j = (*a31_ptr)(c1,c2); } $ The relevant source lines are: typedef int(* __ptr32 a31)(char *, ...) __attribute__((amode31)); which defines the function as a 31 bit function then the call to the function: int j = (*a31_ptr)(c1,c2); which should result in the generation of 31 bit pointers in the call sequence. ===== ACTUAL LISTING OUTPUT: SAM31 LA 1,152(,13) ST 2,152(,13) ST 0,156(,13) ST 2,160(,13) ST 14,164(,13) MVC 8(4,13),#NAB_1+4 BASR 14,15 LGR 15,2 SAM64 ===== EXPECTED LISTING OUTPUT: SAM31 LA 1,152(,13) ST 0,152(,13) ST 14,156(,13) MVC 8(4,13),#NAB_1+4 BASR 14,15 LGR 15,2 SAM64
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: zOS METALC programmers who use mixed mode * * functions without explicit AMODE qualifiers. * **************************************************************** * PROBLEM DESCRIPTION: When compiling a METALC program * * containing mixed mode functions the * * compiler does not emit correct * * assembler instructions for invoking * * mixed mode functions using a function * * pointer. * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
Apply provided service.
Temporary fix
Comments
APAR Information
APAR number
PI50508
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:
Modules/Macros
CCNEP
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