aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/id-pr48805.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/id-pr48805.c')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/id-pr48805.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr48805.c b/gcc/testsuite/gcc.dg/graphite/id-pr48805.c
new file mode 100644
index 0000000..f13a828
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/id-pr48805.c
@@ -0,0 +1,20 @@
+void *A(const void *a);
+void C(void);
+
+static void B(unsigned short a[])
+{
+ long i, j, tmp;
+
+ for(i = 0; i < 3; i++) {
+ for(j = 1; j <= 3; j++)
+ tmp -= a[i - j];
+
+ a[i] = (unsigned short)(tmp >> 1);
+ }
+}
+void C(void)
+{
+ unsigned short a[3], b[3];
+ B(b + 1);
+ A(a);
+}