xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2002-02-13-ReloadProblem.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc /* This triggered a problem in reload, fixed by disabling most of the
4*f4a2713aSLionel Sambuc  * steps of compilation in GCC.  Before this change, the code went through
5*f4a2713aSLionel Sambuc  * the entire backend of GCC, even though it was unnecessary for LLVM output
6*f4a2713aSLionel Sambuc  * now it is skipped entirely, and since reload doesn't run, it can't cause
7*f4a2713aSLionel Sambuc  * a problem.
8*f4a2713aSLionel Sambuc  */
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc extern int tolower(int);
11*f4a2713aSLionel Sambuc 
rangematch(const char * pattern,int test,int c)12*f4a2713aSLionel Sambuc const char *rangematch(const char *pattern, int test, int c) {
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc   if ((c <= test) | (tolower(c) <= tolower((unsigned char)test)))
15*f4a2713aSLionel Sambuc     return 0;
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc   return pattern;
18*f4a2713aSLionel Sambuc }
19