annotate gcc/testsuite/gcc.c-torture/compile/pr35006.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-require-effective-target alloca } */
kono
parents:
diff changeset
2 typedef unsigned long grub_uint64_t;
kono
parents:
diff changeset
3 typedef grub_uint64_t grub_size_t;
kono
parents:
diff changeset
4 grub_cmdline_get (unsigned max_len, int echo_char)
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 unsigned xpos, ypos, ystart;
kono
parents:
diff changeset
7 grub_size_t lpos, llen;
kono
parents:
diff changeset
8 char buf[max_len];
kono
parents:
diff changeset
9 void cl_print (int pos, int c)
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 char *p;
kono
parents:
diff changeset
12 for (p = buf + pos; *p; p++)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 if (xpos++ > 78)
kono
parents:
diff changeset
15 grub_putchar ('\n');
kono
parents:
diff changeset
16 grub_putchar (*p);
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 void cl_delete (unsigned len)
kono
parents:
diff changeset
20 {
kono
parents:
diff changeset
21 cl_set_pos ();
kono
parents:
diff changeset
22 cl_print (lpos, ' ');
kono
parents:
diff changeset
23 grub_memmove ();
kono
parents:
diff changeset
24 cl_print (lpos, echo_char);
kono
parents:
diff changeset
25 cl_set_pos ();
kono
parents:
diff changeset
26 }
kono
parents:
diff changeset
27 cl_delete (llen);
kono
parents:
diff changeset
28 grub_size_t n = lpos;
kono
parents:
diff changeset
29 cl_delete (n);
kono
parents:
diff changeset
30 }