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