1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -ftree-vectorize -march=nocona" } */
4 typedef __SIZE_TYPE__
size_t;
5 extern void *malloc (size_t);
6 extern void free (void *);
8 typedef struct _Resource
10 struct _Resource
*next
;
12 } ResourceRec
, *ResourcePtr
;
14 typedef struct _ClientResource
16 ResourcePtr
*resources
;
22 static ClientResourceRec clientTable
[256];
25 RebuildTable (int client
)
28 ResourcePtr res
, next
;
29 ResourcePtr
**tails
, *resources
;
30 ResourcePtr
**tptr
, *rptr
;
32 j
= 2 * clientTable
[client
].buckets
;
35 (ResourcePtr
**) malloc ((unsigned long) (j
* sizeof (ResourcePtr
*)));
37 (ResourcePtr
*) malloc ((unsigned long) (j
* sizeof (ResourcePtr
)));
39 for (rptr
= resources
, tptr
= tails
; --j
>= 0; rptr
++, tptr
++)
41 *rptr
= ((ResourcePtr
) ((void *) 0));
45 clientTable
[client
].hashsize
++;
46 for (j
= clientTable
[client
].buckets
,
47 rptr
= clientTable
[client
].resources
; --j
>= 0; rptr
++)
49 for (res
= *rptr
; res
; res
= next
)
52 res
->next
= ((ResourcePtr
) ((void *) 0));
53 tptr
= &tails
[Hash (client
, res
->id
)];
58 free ((void *) tails
);
59 clientTable
[client
].buckets
*= 2;
60 free ((void *) clientTable
[client
].resources
);
61 clientTable
[client
].resources
= resources
;
64 /* { dg-final { scan-assembler-not "movlps" } } */