APAR status
Closed as program error.
Error description
When compiling the testcase with -O3 an internal compiler error is caused by the assignment in the conditional i.e. 19 if (x = t->cln) Below is the -O3 internal compiler error: $ xlc++_r -q64 -O3 -c -o mymodule.o mymodule.c 1500-004: (U) INTERNAL COMPILER ERROR while compiling windex. Compilation ended. Contact your Service Representative and provide the following information: GRARNN: cr591 is used before it is defined. For more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810 1586-346 (U) An error occurred during code generation. The code generation return code was 1. $ ===== TESTCASE: $ cat -n mymodule.c 1 typedef unsigned short USHORT; 2 typedef unsigned char UCHAR; 3 4 5 typedef struct 6 { 7 UCHAR mln; 8 UCHAR cln; 9 USHORT wdata[1]; 10 } WIDE; 11 12 int windex(WIDE* t, WIDE* s) 13 { 14 int i; 15 int j; 16 int x; 17 int y; 18 19 if (x = t->cln) 20 { 21 y = s->cln - x; 22 for (i = 0; i <= y; i++) 23 { 24 for (j = 0; j < x && t->wdata[j] == s->wdata[i + j]; j++) 25 { 26 } 27 if (j == x) 28 { 29 return (i + 1); 30 } 31 } 32 } 33 return (0); 34 } 35 $
Local fix
===== WORKAROUND: Using -O2 optimization with the testcase passes compilation.
Problem summary
USERS AFFECTED: XLC Users using the OPTIMIZE option. PROBLEM DESCRIPTION: The unswitch pass(invariant branch motion) may incorrectly move a branch together with its inputs to the outside of the loop.
Problem conclusion
The compiler backend component has been fixed by aborting the compare process when register has more than 1 definition.
Temporary fix
Comments
APAR Information
APAR number
IJ46674
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
G10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2023-05-04
Closed date
2023-06-09
Last modified date
2023-06-09
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/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"G10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
09 June 2023