IBM Support

IV31753: OMP PARALLEL ERROR FROM C99 VARIABLE USAGE

Fixes are available

November 2012 PTF for XL C for AIX, V12.1
November 2012 PTF for XL C/C++ for AIX, V12.1
March 2013 PTF for XL C for AIX, V12.1
March 2013 PTF for XL C/C++ for AIX, V12.1
XL C/C++ for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 5 (September 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C for AIX Fix Pack 5 (September 2013 PTF) for 12.1
XL C for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 21 (January 2019 Update) for 12.1
XL C for AIX Fix Pack 21 (January 2019 Update) for 12.1

Subscribe

You can track all active APARs for this component.

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

    IV31753

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-11-09

  • Closed date

    2012-11-09

  • Last modified date

    2012-11-09

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

    LI76851

  • 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



Document information

More support for: XL C for AIX
Compiler

Software version: 12.1

Reference #: IV31753

Modified date: 09 November 2012