Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / builtins / lib / strrchr.c
blobc2f7107064c97def6b895053b7f87231895b87ce
1 extern void abort (void);
2 extern int inside_main;
4 char *
5 strrchr (const char *s, int c)
7 __SIZE_TYPE__ i;
9 #ifdef __OPTIMIZE__
10 if (inside_main)
11 abort ();
12 #endif
14 i = 0;
15 while (s[i] != 0)
16 i++;
19 if (s[i] == c)
20 return (char *) s + i;
21 while (i-- != 0);
23 return 0;
26 char *
27 rindex (const char *s, int c)
29 return strrchr (s, c);