2017-08-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr48053-1.c
blob155d37e660b7105c161f3a654f1fcfec43cdd38a
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 } */
7 int sourcenode;
8 int ARCHelems;
9 int *source_elms;
10 void vv12x12 (double *, double *, double *);
11 void
12 foo (int argc, char **argv)
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++)
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++)
27 v[j] = -v[j];
28 Mexv[j] = -Mexv[j];
29 Cexv[j] = -Cexv[j];