annotate gcc/testsuite/gcc.c-torture/compile/pr65803.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-options "-fno-strict-overflow" } */
kono
parents:
diff changeset
2 typedef unsigned char __uint8_t;
kono
parents:
diff changeset
3 typedef __uint8_t uint8_t;
kono
parents:
diff changeset
4 typedef uint8_t u8_t;
kono
parents:
diff changeset
5 typedef struct ip_addr ip_addr_t;
kono
parents:
diff changeset
6 char *
kono
parents:
diff changeset
7 ipaddr_ntoa_r (const ip_addr_t * addr, char *buf, int buflen)
kono
parents:
diff changeset
8 {
kono
parents:
diff changeset
9 char inv[3];
kono
parents:
diff changeset
10 char *rp;
kono
parents:
diff changeset
11 u8_t *ap;
kono
parents:
diff changeset
12 u8_t n;
kono
parents:
diff changeset
13 u8_t i;
kono
parents:
diff changeset
14 int len = 0;
kono
parents:
diff changeset
15 for (n = 0; n < 4; n++)
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 while (*ap);
kono
parents:
diff changeset
18 while (i--)
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 if (len++ >= buflen)
kono
parents:
diff changeset
21 return ((void *) 0);
kono
parents:
diff changeset
22 *rp++ = inv[i];
kono
parents:
diff changeset
23 } ap++;
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 }