In gcc/testsuite/: 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20030414-1.c
blob9ba595318dcac5742f9f3f117de9630285ab6ec1
1 /* PR target/10377
2 Distilled by Hans-Peter Nilsson <hp@axis.com> from ncurses-5.3 infocmp.c.
3 Copyright (C) 2003 Free Software Foundation. */
5 /* { dg-do assemble } */
6 /* { dg-options "-O2 -fPIC" { target *-*-*gnu* } } */
8 extern int f2 (char *, char *);
9 extern char *ss[];
10 extern char *cc;
11 void
12 f1 (char *dd, char *bb)
14 char *sp = bb + 1;
15 char *ap;
16 int i;
17 char *ee = 0;
18 char *cp;
20 for (i = 0, cp = cc; i < 42; i++)
21 if (cp)
23 if (f2 (dd, "xx") || f2 (ss[i], "xx") || f2 (ss[i], "yy"))
24 if (bb < cp)
25 continue;
26 ee = ss[i];
27 break;
30 if (!ee)
31 for (ap = cc; *ap; ap++)
32 if (f2(ap, sp))
34 ee = ap;
35 break;
38 cc = ee;