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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr35011.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O3 -fcheck-data-deps" }
3
 
4
double foo(const double* p0, const double* p1, const double* q0)
5
{
6
  double d;
7
  for (; p0 != p1; ++p0, ++q0)
8
    d += *p0 * *q0;
9
  return d;
10
}
11
 
12
struct A
13
{
14
  double x[3];
15
  const double* begin() const { return x; }
16
};
17
 
18
struct B
19
{
20
  A a0, a1;
21
  double d;
22
  B(const A&);
23
};
24
 
25
B::B(const A& a) : a0(a), a1(a), d(foo(a0.begin(), a0.begin()+3, a1.begin()))
26
{}

powered by: WebSVN 2.1.0

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