OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [vect/] [pr33835.cc] - Blame information for rev 717

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
4
 
5
extern double cos (double x);
6
 
7
class bend_class
8
{
9
  double *s_A;
10
public:
11
  void set_s_A (double s_A0)
12
  {
13
    s_A[0] = s_A0;
14
  }
15
};
16
class bend_set
17
{
18
  bend_class *bend_array;
19
public:
20
  void set_s_A (int index, double s_A0)
21
  {
22
    bend_array[index].set_s_A (s_A0);
23
  }
24
  void compute_s (void)
25
  {
26
    int i, j;
27
    double val;
28
    double tmp[3];
29
    for (i = 0; i < 5; ++i)
30
    {
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);
36
    }
37
  }
38
};
39
class internals
40
{
41
  bend_set bend;
42
  void compute_s (void);
43
};
44
void
45
internals::compute_s (void)
46
{
47
  bend.compute_s ();
48
}
49
 
50
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.