Merge from branches/gcc-4_8-branch up to rev 207411.
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / gcc.target / arm / pr59826.c
blobb7053e4268dc949f7ebce62df43594207ca7103b
1 /* { dg-do compile } */
2 /* { dg-options "-mthumb -mcpu=cortex-m4 -fprefetch-loop-arrays -O2" } */
4 typedef struct genxWriter_rec * genxWriter;
5 typedef unsigned char * utf8;
6 typedef const unsigned char * constUtf8;
8 int genxScrubText(genxWriter w, constUtf8 in, utf8 out)
10 int problems = 0;
11 constUtf8 last = in;
13 while (*in)
15 int c = genxNextUnicodeChar(&in);
16 if (c == -1)
18 problems++;
19 last = in;
20 continue;
23 if (!isXMLChar(w, c))
25 problems++;
26 last = in;
27 continue;
30 while (last < in)
31 *out++ = *last++;
33 *out = 0;
34 return problems;