aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/s390/pr55718.c
blob: a82d435229b146ebca850fb118d7c2405f9fb760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* PR target/55717  */

/* { dg-do compile } */
/* { dg-options "-O2 -march=z10 -fPIC" } */

extern char temp[];
short ansi_value[256];
void terminal_state(void)
{
  static const char *puc[] = { "", "<", "=", ">", "?", 0};
  int i, j, k, l, modes_found;
  char buf[256];
  k = (int) __builtin_strlen(temp);
  for (j = l = 0; j < 255 && j - l < 50; j++)
    {
      __builtin_sprintf(temp, "\033[%s%d$p", puc[i], j);
      if (ansi_value[1])
        {
          l = j;
          buf[k] = '\0';
          put_crlf();
          ptextln(buf);
          buf[k++] = ' ';
          k = (int) __builtin_strlen(temp);
        }
    }
  for (i = j = 0; j < modes_found; j = ++i >> 1)
    ;
}