OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [charset/] [builtin1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* isdigit(c) can be optimized to ((unsigned)c) - '0' <= 9, but only if
2
   we know the correct value of '0'.  PR 18785.  */
3
 
4
/* { dg-do run } */
5
/* { dg-require-iconv "IBM1047" } */
6
/* { dg-options "-O2 -fno-inline -fexec-charset=IBM1047" } */
7
 
8
extern int isdigit(int);
9
extern void abort(void);
10
 
11
static int str1(void) { return '1'; }
12
static int strA(void) { return 'A'; }
13
 
14
int
15
main(void)
16
{
17
  if (!isdigit('1'))
18
    abort();
19
  if (isdigit('A'))
20
    abort();
21
  if (!isdigit(str1()))
22
    abort();
23
  if (isdigit(strA()))
24
    abort();
25
  return 0;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.