pr40209.c: Add test case.

2009-09-22  Neil Vachharajani  <nvachhar@google.com>

        * testsuite/gcc.dg/pr40209.c: Add test case.

From-SVN: r152032
This commit is contained in:
Neil Vachharajani 2009-09-22 16:48:19 +00:00 committed by Neil Vachharajani
parent 711018709f
commit 7c5c5c6e00
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-09-22 Neil Vachharajani <nvachhar@google.com>
* testsuite/gcc.dg/pr40209.c: Add test case.
2009-09-22 Janis Johnson <janis187@us.ibm.com>
* config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return

View File

@ -0,0 +1,22 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-use" } */
void process(const char *s);
struct BaseHolder {
unsigned int base_;
};
void UInt2Str(struct BaseHolder *b, unsigned int x) {
static const char digit[] = "0123456789abcdefghijklmnopqrstuvwxyz";
char buf[100];
int i = 100;
do {
buf[--i] = digit[x % b->base_];
x /= b->base_;
} while (x > 0);
process(buf);
}
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*\.gcda not found, execution counts estimated.*" } */