1 /* Test for ICE arising from VSX code generation.  */
2 /* { dg-do compile } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
4 /* { dg-options "-O3 -mcpu=power7 -funroll-loops" } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 
7 int sourcenode;
8 int ARCHelems;
9 int *source_elms;
10 void vv12x12 (double *, double *, double *);
11 void
foo(int argc,char ** argv)12 foo (int argc, char **argv)
13 {
14   int i, j;
15   int cor[4];
16   double Ke[12][12], Me[12], Ce[12], Mexv[12], Cexv[12], v[12];
17   for (i = 0; i < ARCHelems; i++)
18     {
19       for (j = 0; j < 12; j++)
20 	Me[j] = 0.0;
21       if (cor[j] == sourcenode)
22 	vv12x12 (Me, v, Mexv);
23       vv12x12 (Ce, v, Cexv);
24       if (source_elms[i] == 3)
25 	for (j = 0; j < 12; j++)
26 	  {
27 	    v[j] = -v[j];
28 	    Mexv[j] = -Mexv[j];
29 	    Cexv[j] = -Cexv[j];
30 	  }
31     }
32 }
33