diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr59418.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr59418.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr59418.c b/gcc/testsuite/gcc.dg/pr59418.c new file mode 100644 index 00000000000..114c1d383c4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr59418.c @@ -0,0 +1,35 @@ +/* PR debug/59418 */ +/* Reported by Ryan Mansfield <rmansfield@qnx.com> */ + +/* { dg-do compile } */ +/* { dg-options "-Os -g" } */ +/* { dg-options "-march=armv7-a -mfloat-abi=hard -Os -g" { target arm*-*-* } } */ + +extern int printf (const char *__format, ...); + +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"); +} |