1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fprofile-use -fopt-info" } */
3
4 void process(const char *s);
5
6 struct BaseHolder {
7 unsigned int base_;
8 };
9
UInt2Str(struct BaseHolder * b,unsigned int x)10 void UInt2Str(struct BaseHolder *b, unsigned int x) {
11 static const char digit[] = "0123456789abcdefghijklmnopqrstuvwxyz";
12 char buf[100];
13 int i = 100;
14 do {
15 buf[--i] = digit[x % b->base_];
16 x /= b->base_;
17 } while (x > 0);
18 process(buf);
19 }
20
21 /* Ignore a warning that is irrelevant to the purpose of this test. */
22 /* { dg-prune-output ".*\.gcda not found, execution counts estimated.*" } */
23