Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / pr40209.c
blobf367f7c247245239805850a9058503b3f80b8f76
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fprofile-use" } */
4 void process(const char *s);
6 struct BaseHolder {
7 unsigned int base_;
8 };
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);
21 /* Ignore a warning that is irrelevant to the purpose of this test. */
22 /* { dg-prune-output ".*\.gcda not found, execution counts estimated.*" } */