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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [lib/] [strlen.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
extern void abort (void);
2
extern int inside_main;
3
 
4
__attribute__ ((__noinline__))
5
__SIZE_TYPE__
6
strlen (const char *s)
7
{
8
  __SIZE_TYPE__ i;
9
 
10
#ifdef __OPTIMIZE__
11
  if (inside_main)
12
    abort ();
13
#endif
14
 
15
  i = 0;
16
  while (s[i] != 0)
17
    i++;
18
 
19
  return i;
20
}

powered by: WebSVN 2.1.0

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