2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / g++.dg / vect / pr33835.cc
blob1ab4c7e8d3d90b85110c309d61999e9654e38a9b
1 /* { dg-do compile } */
3 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
5 extern double cos (double x);
7 class bend_class
9 double *s_A;
10 public:
11 void set_s_A (double s_A0)
13 s_A[0] = s_A0;
16 class bend_set
18 bend_class *bend_array;
19 public:
20 void set_s_A (int index, double s_A0)
22 bend_array[index].set_s_A (s_A0);
24 void compute_s (void)
26 int i, j;
27 double val;
28 double tmp[3];
29 for (i = 0; i < 5; ++i)
31 val = i;
32 for (j = 0; j < 2; ++j)
33 tmp[j] = cos (val);
34 set_s_A (i, tmp[0]);
35 tmp[j] = cos (val);
39 class internals
41 bend_set bend;
42 void compute_s (void);
44 void
45 internals::compute_s (void)
47 bend.compute_s ();
50 /* { dg-final { cleanup-tree-dump "vect" } } */