2 /* { dg-options "-std=gnu99 -Wall -Wextra -O1" } */
4 extern void *memset (void*, int, __SIZE_TYPE__
);
5 extern void abort (void);
7 struct radix_tree_root
{
9 struct radix_tree_node
*rnode
;
12 struct radix_tree_node
{
15 unsigned long tags
[2];
18 struct radix_tree_path
{
19 struct radix_tree_node
*node
, **slot
;
23 void radix_tree_tag_clear(struct radix_tree_root
*root
, unsigned long index
)
25 struct radix_tree_path path
[7], *pathp
= path
;
26 unsigned int height
, shift
;
27 volatile unsigned long *addr
;
29 height
= root
->height
;
31 shift
= (height
- 1) * 6;
32 path
[0].slot
= &root
->rnode
;
37 offset
= (index
>> shift
) & (64-1);
38 pathp
[1].offset
= offset
;
39 pathp
[1].node
= *pathp
[0].slot
;
40 pathp
[1].slot
= (struct radix_tree_node
**)
41 (pathp
[1].node
->slots
+ offset
);
47 addr
= &(pathp
->node
->tags
[0]) + 1;
51 struct radix_tree_root r
;
52 struct radix_tree_node node
;
59 memset (&node
, 0, sizeof (node
));
63 radix_tree_tag_clear (&r
, 13);