Split print_rtx into subroutines
[official-gcc.git] / gcc / testsuite / gcc.dg / pr18241-2.c
bloba3ff1de0f7004b2d616dccc8c5a65c567a197d4a
1 /* { dg-do run } */
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 {
8 unsigned int height;
9 struct radix_tree_node *rnode;
12 struct radix_tree_node {
13 unsigned int count;
14 void *slots[64];
15 unsigned long tags[2];
18 struct radix_tree_path {
19 struct radix_tree_node *node, **slot;
20 int offset;
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;
34 while (height > 0) {
35 int offset;
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);
42 pathp++;
43 shift -= 6;
44 height--;
47 addr = &(pathp->node->tags[0]) + 1;
48 *addr = 574;
51 struct radix_tree_root r;
52 struct radix_tree_node node;
54 int main ()
56 r.height = 1;
57 r.rnode = &node;
59 memset (&node, 0, sizeof (node));
61 node.count = 1;
63 radix_tree_tag_clear (&r, 13);
64 return 0;