1 /* { dg-do run } */ 2 /* { dg-options "-O3 -fno-tree-loop-ivcanon -fno-tree-vectorize" } */ 3 4 static int in[8][4]; 5 static int out[4]; 6 static const int check_result[] = {0, 16, 256, 4096}; 7 foo()8static inline void foo () 9 { 10 int sum; 11 int i, j, k; 12 for (k = 0; k < 4; k++) 13 { 14 sum = 1; 15 for (j = 0; j < 4; j++) 16 for (i = 0; i < 4; i++) 17 sum *= in[i + k][j]; 18 out[k] = sum; 19 } 20 } 21 main()22int main () 23 { 24 int i, j, k; 25 for (i = 0; i < 8; i++) 26 for (j = 0; j < 4; j++) 27 in[i][j] = (i + 2) / 3; 28 foo (); 29 for (k = 0; k < 4; k++) 30 if (out[k] != check_result[k]) 31 __builtin_abort (); 32 return 0; 33 } 34