aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c
new file mode 100644
index 000000000..12bb27f31
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/961213-1.c
@@ -0,0 +1,22 @@
+int
+g (unsigned long long int *v, int n, unsigned int a[], int b)
+{
+ int cnt;
+ *v = 0;
+ for (cnt = 0; cnt < n; ++cnt)
+ *v = *v * b + a[cnt];
+ return n;
+}
+
+main ()
+{
+ int res;
+ unsigned int ar[] = { 10, 11, 12, 13, 14 };
+ unsigned long long int v;
+
+ res = g (&v, sizeof(ar)/sizeof(ar[0]), ar, 16);
+ if (v != 0xabcdeUL)
+ abort ();
+
+ exit (0);
+}