URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 816 |
Rev 826 |
/* isdigit(c) can be optimized to ((unsigned)c) - '0' <= 9, but only if
|
/* isdigit(c) can be optimized to ((unsigned)c) - '0' <= 9, but only if
|
we know the correct value of '0'. PR 18785. */
|
we know the correct value of '0'. PR 18785. */
|
|
|
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-require-iconv "IBM1047" } */
|
/* { dg-require-iconv "IBM1047" } */
|
/* { dg-options "-O2 -fno-inline -fexec-charset=IBM1047" } */
|
/* { dg-options "-O2 -fno-inline -fexec-charset=IBM1047" } */
|
|
|
extern int isdigit(int);
|
extern int isdigit(int);
|
extern void abort(void);
|
extern void abort(void);
|
|
|
static int str1(void) { return '1'; }
|
static int str1(void) { return '1'; }
|
static int strA(void) { return 'A'; }
|
static int strA(void) { return 'A'; }
|
|
|
int
|
int
|
main(void)
|
main(void)
|
{
|
{
|
if (!isdigit('1'))
|
if (!isdigit('1'))
|
abort();
|
abort();
|
if (isdigit('A'))
|
if (isdigit('A'))
|
abort();
|
abort();
|
if (!isdigit(str1()))
|
if (!isdigit(str1()))
|
abort();
|
abort();
|
if (isdigit(strA()))
|
if (isdigit(strA()))
|
abort();
|
abort();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.