(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr81633.c
       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}};
       9  
      10  static void __attribute__((noinline,noclone))
      11  kernel(double A[4][4])
      12  {
      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];
      20  }
      21  
      22  int main(void)
      23  {
      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;
      31  }