IBM Support

PH33348: VECTOR OPTION CAUSES SOME UNIT TESTS TO FAIL, USING ZOS V2.4 XL C/C++

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • VECTOR OPTION CAUSES SOME UNIT TESTS TO FAIL, USING XL C/C++ FOR
    LINUX, V16.1
    
    ----------------------------------------------------------------
    
    
    =====COMPILE COMMAND:
    
    xlc t.c -qarch=12 -qvector -qfloat=ieee -q64 -qphaseid -qlist=./
     -O2
    
    
    
    ====TESTCASE:
    
    #include <stdlib.h>
    #include <time.h>
    
    #define ARRAY_SIZE 50
    
    void bar(double aa[ARRAY_SIZE][ARRAY_SIZE]) {
      printf("%f\n", aa[0][0]);
      return;
    }
    
    double foo(double a, double b, double c, double d, double e,
    double f, double g, double h, double i, double j, double k,
    double l, double m, double n, double o, double p, double q,
    double r, double s, double t, double u, double v, double w,
    double x, double y) {
      double z = a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y;
      double z2 = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y;
      double aa[ARRAY_SIZE][ARRAY_SIZE];
    
      for (int ii = 0; ii < ARRAY_SIZE; ii++) {
        for (int jj = 0; jj < ARRAY_SIZE; jj++) {
          aa[ii][jj] = rand()/RAND_MAX * 10.0;
        }
      }
      bar(aa);
      return z-z2;
    }
    
    int main() {
      srand(time(NULL));
      double a = (double)rand()/RAND_MAX * 10.0;
      double b = (double)rand()/RAND_MAX * 10.0;
      double c = (double)rand()/RAND_MAX * 10.0;
      double d = (double)rand()/RAND_MAX * 10.0;
      double e = (double)rand()/RAND_MAX * 10.0;
      double f = (double)rand()/RAND_MAX * 10.0;
      double g = (double)rand()/RAND_MAX * 10.0;
      double h = (double)rand()/RAND_MAX * 10.0;
      double i = (double)rand()/RAND_MAX * 10.0;
      double j = (double)rand()/RAND_MAX * 10.0;
      double k = (double)rand()/RAND_MAX * 10.0;
      double l = (double)rand()/RAND_MAX * 10.0;
      double m = (double)rand()/RAND_MAX * 10.0;
      double n = (double)rand()/RAND_MAX * 10.0;
      double o = (double)rand()/RAND_MAX * 10.0;
      double p = (double)rand()/RAND_MAX * 10.0;
      double q = (double)rand()/RAND_MAX * 10.0;
      double r = (double)rand()/RAND_MAX * 10.0;
      double s = (double)rand()/RAND_MAX * 10.0;
      double t = (double)rand()/RAND_MAX * 10.0;
      double u = (double)rand()/RAND_MAX * 10.0;
      double v = (double)rand()/RAND_MAX * 10.0;
      double w = (double)rand()/RAND_MAX * 10.0;
      double x = (double)rand()/RAND_MAX * 10.0;
      double y = (double)rand()/RAND_MAX * 10.0;
      double z =
    foo(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y);
    
      if (z == (a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y -
    (a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y)))
        return 55;
      else
        return 66;
    }
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users compiling with the VECTOR, ARCH>=11,   *
    *                 FLOAT(IEEE) options and with stack frames    *
    *                 larger than 4095 bytes                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: Compiled program could have undefined   *
    *                      behaviour related to passed float,      *
    *                      double or long double parameters        *
    ****************************************************************
    * RECOMMENDATION: Compile with NOVECTOR                        *
    ****************************************************************
    N/A
    

Problem conclusion

  • Use workaround or apply patch
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH33348

  • Reported component name

    RUNTIME LIB EXT

  • Reported component ID

    56551210D

  • Reported release

    7C0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-01-13

  • Closed date

    2021-02-05

  • Last modified date

    2021-04-01

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

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

Modules/Macros

  • CCNECICS CCNECWI  CCNED240 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C0 PSY UI73821

       UP21/03/26 P F103

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.

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7C0"}]

Document Information

Modified date:
02 April 2021