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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-require-effective-target vect_float }
3
 
4
float mem[4096];
5
const int N=1024;
6
 
7
struct XYZ {
8
    float * mem;
9
    int n;
10
    float * x() { return mem;}
11
    float * y() { return x()+n;}
12
    float * z() { return y()+n;}
13
};
14
 
15
inline
16
void sum(float * x, float * y, float * z, int n) {
17
    for (int i=0;i!=n; ++i)
18
      x[i]=y[i]+z[i];
19
}
20
 
21
void sumS() {
22
    XYZ xyz; xyz.mem=mem; xyz.n=N;
23
    sum(xyz.x(),xyz.y(),xyz.z(),xyz.n);
24
}
25
 
26
// { dg-final { scan-tree-dump-not "run-time aliasing" "vect" } }
27
// { 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.