(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr56348.c
       1  /* PR target/56348 */
       2  /* { dg-do compile { target ia32 } } */
       3  /* { dg-require-effective-target fpic } */
       4  /* { dg-options "-O2 -fPIC -mfpmath=sse -msse2" } */
       5  
       6  typedef unsigned int size_t;
       7  
       8  extern double fabs (double __x) __attribute__ ((__nothrow__, __leaf__))
       9    __attribute__ ((__const__));
      10  
      11  typedef struct cholmod_sparse_struct
      12  {
      13    size_t ncol;
      14    void *p;
      15  } cholmod_sparse;
      16  
      17  int cholmod_l_reallocate_sparse (size_t, cholmod_sparse *, void *);
      18  
      19  int
      20  cholmod_l_drop (double tol, cholmod_sparse * A)
      21  {
      22    double aij;
      23    double *Ax;
      24    long long *Ap, *Ai, *Anz;
      25    long long packed, i, j, nrow, ncol, p, pend, nz, values;
      26    Ap = A->p;
      27    ncol = A->ncol;
      28    nz = 0;
      29    for (j = 0; j < ncol; j++)
      30      for (; p < pend; p++)
      31        {
      32          i = Ai[p];
      33          aij = Ax[p];
      34          if (i <= j && (fabs (aij) > tol || ((aij) != (aij))))
      35            nz++;
      36        }
      37    Ap[ncol] = nz;
      38    cholmod_l_reallocate_sparse (nz, A, 0);
      39  }