diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug/vta-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/vta-2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/vta-2.c b/gcc/testsuite/gcc.dg/debug/vta-2.c new file mode 100644 index 00000000000..5d44262ec76 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/vta-2.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ + +static int +bar (void *a, unsigned int b, int n) +{ + int c = *(unsigned long *) a % b; + *(unsigned long *) a = (int) (*(unsigned long *) a) / b; + return c; +} + +int +foo (unsigned long x, int *y, int z) +{ + int level; + for (level = 0; level < *y; level++) + { + bar (&x, z, sizeof (x)); + if (x) + return *y - 1; + } +} |