Fixes are available
APAR status
Closed as program error.
Error description
The resulting test case produces an incorrect output at runtime when compiled for POWER8: ===== COMPILE COMMAND: xlc -q32 -qdfp -O -qnoansialias -qarch=pwr8 a.c b.c -o a ===== TESTCASE: $ cat a.c #include <stdio.h> _Decimal128 a[5] = { 1, 2, 3, 4, 5 }; int b[5]; void f(_Decimal128 *a, int *b, int n); int main() { f(a, b, 5); printf("%d %d %d %d %d\n", b[0], b[1], b[2], b[3], b[4]); return 0; } $ $ cat b.c void f(_Decimal128 *a, int *b, int n) { for (int i = 0; i < n; i++) b[i] = (int)a[i]; } $ ===== ACTUAL OUTPUT: $ ./a 0 0 0 0 2147483647 $ ===== EXPECTED OUTPUT: $ ./a 1 2 3 4 5 $
Local fix
N/A
Problem summary
USERS AFFECTED: Clients who compile applications meant to run on POWER8 may be affected by this issue PROBLEM DESCRIPTION: This test case exposes an issue in one of the internal compiler optimizations. A certain internal variable is sometimes a register copy and sometimes a transfer between float and vector registers. The problem is that we propagate a float register into a vector instruction and then fail to save and restore properly across a call.
Problem conclusion
The internal optimization has been fixed.
Temporary fix
Comments
APAR Information
APAR number
IJ08104
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
D13
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-08-01
Closed date
2018-08-01
Last modified date
2018-08-01
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 FOR AIX
Fixed component ID
5725C7100
Applicable component levels
RD13 PSY
UP
[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D13"}]
Document Information
Modified date:
24 August 2021