2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr56348.c
blobc31814f60f47c9bcf4d839e07176e0f682a8e909
1 /* PR target/56348 */
2 /* { dg-do compile { target ia32 } } */
3 /* { dg-options "-O2 -fPIC -mfpmath=sse -msse2" } */
5 typedef unsigned int size_t;
7 extern double fabs (double __x) __attribute__ ((__nothrow__, __leaf__))
8 __attribute__ ((__const__));
10 typedef struct cholmod_sparse_struct
12 size_t ncol;
13 void *p;
14 } cholmod_sparse;
16 int cholmod_l_reallocate_sparse (size_t, cholmod_sparse *, void *);
18 int
19 cholmod_l_drop (double tol, cholmod_sparse * A)
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++)
31 i = Ai[p];
32 aij = Ax[p];
33 if (i <= j && (fabs (aij) > tol || ((aij) != (aij))))
34 nz++;
36 Ap[ncol] = nz;
37 cholmod_l_reallocate_sparse (nz, A, 0);