annotate gcc/testsuite/gcc.dg/vect/pr81633.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 static double identity[4][4] = {{1, 0, 0, 0},
kono
parents:
diff changeset
2 {0, 1, 0, 0},
kono
parents:
diff changeset
3 {0, 0, 1, 0},
kono
parents:
diff changeset
4 {0, 0, 0, 1}};
kono
parents:
diff changeset
5 static double expected[4][4] = {{1, 0, 0, 0},
kono
parents:
diff changeset
6 {0, 0, 0, 0},
kono
parents:
diff changeset
7 {0, 0, 0, 0},
kono
parents:
diff changeset
8 {0, 0, 0, 0}};
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 static void __attribute__((noinline,noclone))
kono
parents:
diff changeset
11 kernel(double A[4][4])
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 double tmp[4][4];
kono
parents:
diff changeset
14 for (int j = 0; j < 4; j++)
kono
parents:
diff changeset
15 for (int k = 0; k < 4; k++)
kono
parents:
diff changeset
16 tmp[j][k] = identity[j][0] * identity[j][k];
kono
parents:
diff changeset
17 for (int j = 0; j < 4; j++ )
kono
parents:
diff changeset
18 for (int k = 0; k < 4; k++)
kono
parents:
diff changeset
19 A[j][k] = tmp[j][k];
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 int main(void)
kono
parents:
diff changeset
23 {
kono
parents:
diff changeset
24 double A[4][4] = {{0.0}};
kono
parents:
diff changeset
25 kernel(A);
kono
parents:
diff changeset
26 for ( int i = 0; i < 4; i++ )
kono
parents:
diff changeset
27 for ( int j = 0; j < 4; j++ )
kono
parents:
diff changeset
28 if (A[i][j] != expected[i][j])
kono
parents:
diff changeset
29 __builtin_abort ();
kono
parents:
diff changeset
30 return 0;
kono
parents:
diff changeset
31 }