LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr81633.c
blob9689ab3959cd9df8234b89ec307b7cd5d6f9d795
1 static double identity[4][4] = {{1, 0, 0, 0},
2 {0, 1, 0, 0},
3 {0, 0, 1, 0},
4 {0, 0, 0, 1}};
5 static double expected[4][4] = {{1, 0, 0, 0},
6 {0, 0, 0, 0},
7 {0, 0, 0, 0},
8 {0, 0, 0, 0}};
10 static void __attribute__((noinline,noclone))
11 kernel(double A[4][4])
13 double tmp[4][4];
14 for (int j = 0; j < 4; j++)
15 for (int k = 0; k < 4; k++)
16 tmp[j][k] = identity[j][0] * identity[j][k];
17 for (int j = 0; j < 4; j++ )
18 for (int k = 0; k < 4; k++)
19 A[j][k] = tmp[j][k];
22 int main(void)
24 double A[4][4] = {{0.0}};
25 kernel(A);
26 for ( int i = 0; i < 4; i++ )
27 for ( int j = 0; j < 4; j++ )
28 if (A[i][j] != expected[i][j])
29 __builtin_abort ();
30 return 0;