1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivopts-details" } */
9 sort_pointers (size_t n
, void **pointers
, void **work
)
11 typedef unsigned char digit_t
;
12 unsigned int count
[MAX_NUM
];
17 if ((sizeof (void *) / sizeof (digit_t
)) % 2 != 0)
20 for (i
= 0, j
= 0; i
< sizeof (size_t); ++i
)
26 big_endian_p
= (((char *)&j
)[0] == 0);
27 for (i
= 0; i
< sizeof (void *) / sizeof (digit_t
); ++i
)
36 j
= sizeof (void *) / sizeof (digit_t
) - i
;
40 memset (count
, 0, MAX_NUM
* sizeof (unsigned int));
41 bias
= ((digit_t
*) pointers
) + j
;
42 top
= ((digit_t
*) (pointers
+ n
)) + j
;
45 digit
+= sizeof (void *) / sizeof (digit_t
))
48 for (countp
= count
+ 1; countp
< count
+ MAX_NUM
; ++countp
)
49 *countp
+= countp
[-1];
51 for (pointerp
= pointers
+ n
- 1; pointerp
>= pointers
; --pointerp
)
52 work
[--count
[((digit_t
*) pointerp
)[j
]]] = *pointerp
;
60 /* { dg-final { scan-tree-dump-not "base \[^\\n\]*&MEM\\\[" "ivopts" } } */