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. */ 4 5 /* { dg-do assemble } */ 6 /* { dg-options "-O2 -fPIC" { target *-*-*gnu* } } */ 7 8 extern int f2 (char *, char *); 9 extern char *ss[]; 10 extern char *cc; 11 void f1(char * dd,char * bb)12f1 (char *dd, char *bb) 13 { 14 char *sp = bb + 1; 15 char *ap; 16 int i; 17 char *ee = 0; 18 char *cp; 19 20 for (i = 0, cp = cc; i < 42; i++) 21 if (cp) 22 { 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; 28 } 29 30 if (!ee) 31 for (ap = cc; *ap; ap++) 32 if (f2(ap, sp)) 33 { 34 ee = ap; 35 break; 36 } 37 38 cc = ee; 39 } 40