view gcc/testsuite/gcc.dg/pr59418.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

/* PR debug/59418 */
/* Reported by Ryan Mansfield <rmansfield@qnx.com> */

/* { dg-do compile } */
/* { dg-options "-Os -g" } */
/* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -Os -g" { target { arm*-*-* && { ! arm_thumb1 } } } } */

extern int printf (const char *__format, ...);
double bar (const char *, int);

void
foo (const char *pptr, int caplen)
{
  int type;
  const char *tptr;
  if (caplen < 4)
    {
      (void) printf ("foo");
      return;
    }
  while (tptr < pptr)
    {
      switch (type)
	{
	case 0x01:
	  printf ("");
	case 0x0b:
	  printf ("");
	case 0x0e:
	  printf ("");
	case 0x10:
	  printf ("%1.2fW", bar (tptr, caplen) / 1000.0);
	}
    }
  printf ("foo");
}