summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/gcc.misc-tests/matrix1.c
diff options
context:
space:
mode:
authorcamthesaxman <camthesaxman@users.noreply.github.com>2020-01-29 18:17:43 -0600
committercamthesaxman <camthesaxman@users.noreply.github.com>2020-01-29 18:17:43 -0600
commitcdc6e2c50f96119bdc4c1205ff5901ca82ec8357 (patch)
tree3e9217eabcf444e166008411f445315606dded59 /gcc_arm/testsuite/gcc.misc-tests/matrix1.c
parent27176890c4a688ea7de44d3f55af32827016a9fd (diff)
add old compiler with ARM support
Diffstat (limited to 'gcc_arm/testsuite/gcc.misc-tests/matrix1.c')
-rwxr-xr-xgcc_arm/testsuite/gcc.misc-tests/matrix1.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/gcc.misc-tests/matrix1.c b/gcc_arm/testsuite/gcc.misc-tests/matrix1.c
new file mode 100755
index 0000000..62c7115
--- /dev/null
+++ b/gcc_arm/testsuite/gcc.misc-tests/matrix1.c
@@ -0,0 +1,46 @@
+/* Matrix operations */
+
+#define BOUND 100
+
+int a[BOUND][BOUND],b[BOUND][BOUND],c[BOUND][BOUND];
+
+main()
+{
+int i,j,k;
+
+
+
+ for (i=0; i<BOUND; i++)
+ {
+ for (j=0; j<BOUND; j++)
+ {
+ a[i][j] = 1;
+ b[i][j] = 1;
+ }
+ }
+ for (i=0; i<BOUND; i++)
+ {
+ for (j=0; j<BOUND; j++)
+ {
+ c[i][j] = 0;
+ for (k=0; k<BOUND; k++)
+ {
+ c[i][j] = c[i][j] + a[i][k] * b[k][j];
+ }
+ }
+ }
+ for (i=0; i<BOUND; i++)
+ {
+ for (j=0; j<BOUND; j++)
+ {
+ if (c[i][j] != BOUND)
+ {
+ /*printf("ERROR\n");*/
+ return 0;
+ }
+ }
+ }
+ i=5;
+
+ exit (0);
+}