Fixes are available
APAR status
Closed as program error.
Error description
When compiling an OMP for loop with mismatched loop counter datatypes, the OMP syntax check is being too strict and outputing an error. ===== TEST CASE ===== int main() { long var=0; #pragma omp parallel for schedule(static) for(int i1=0; i1<var; i1++) {} } $ xlc_r reduce.c -qsmp=omp -q64 "reduce.c", line 5.23: 1506-818 (S) Controlling expression of the for loop is not in the canonical form.
Local fix
Move the loop counter variable declaration outside of the for loop. This will change the variable promotion rules and work around the issue.
Problem summary
PROBLEM DESCRIPTION: The compiler is issuing a severe error for a 'for' loop not in OMP canonical form when using -q64, but the C standard allows it. USERS AFFECTED: Users using different integral types and sign with loop variable in a 'for' loop at 64bit.
Problem conclusion
Confirmed that the OMP form should not be more restrictive than the C standard. The check was relaxed, and mixed integral types are now allowed.
Temporary fix
Comments
APAR Information
APAR number
LI76852
Reported component name
XL C/C++ FOR LI
Reported component ID
5724X1400
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2012-06-14
Closed date
2012-10-10
Last modified date
2012-10-10
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 LI
Fixed component ID
5724X1400
Applicable component levels
RB10 PSY
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
16 October 2021