view 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
line wrap: on
line source

/* { dg-options "-fno-strict-overflow" } */
typedef unsigned char __uint8_t;
typedef __uint8_t uint8_t;
typedef uint8_t u8_t;
typedef struct ip_addr ip_addr_t;
char *
ipaddr_ntoa_r (const ip_addr_t * addr, char *buf, int buflen)
{
  char inv[3];
  char *rp;
  u8_t *ap;
  u8_t n;
  u8_t i;
  int len = 0;
  for (n = 0; n < 4; n++)
    {
      while (*ap);
      while (i--)
	{
	  if (len++ >= buflen)
	    return ((void *) 0);
	  *rp++ = inv[i];
	} ap++;
    }
}