view gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
line wrap: on
line source

int foo;
typedef long unsigned int size_t;
typedef short unsigned int wchar_t;
extern int swprintf (wchar_t *wcs, size_t maxlen, const wchar_t *format, ...);
struct tm
{
  int tm_mday;
  int tm_mon;
  int tm_year;
};
size_t
__strftime (wchar_t * s, size_t maxsize, const wchar_t * format, const struct tm *tim_p)
{
  size_t count = 0;
  int len = 0;
  size_t i, ctloclen;
  unsigned long width;
  {
    if (foo)
      {
	{
	  wchar_t *fmt = L"%s%.*d";
	  len = swprintf (&s[count], maxsize, fmt, "-", width, 0);
	}
	if ((count) >= maxsize)
	  return 0;
      }
    else
      {
	len =
	  swprintf (&s[count], maxsize - count, L"%.2d/%.2d/%.2d", 42, 99, 0);
	if ((count) >= maxsize)
	  return 0;

      }
  }
}