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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr25005.C] - Blame information for rev 316

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

Line No. Rev Author Line
1 301 jeremybenn
// PR target/25005
2
// { dg-options "-O2 -funroll-loops" }
3
// { dg-do compile }
4
 
5
inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
6
 
7
struct M { ~M() { } };
8
 
9
struct P
10
{
11
  P () { v[0] = 0; v[1] = 0; v[2] = 0; }
12
  P (const P &x) { for (int i = 0; i < 3; ++i) v[i] = x.v[i]; }
13
  double v[3];
14
};
15
 
16
struct V : public M
17
{
18
  V (const P *x, const P *y)
19
  {
20
    P *b = this->a = ::new P[2];
21
    for (; x != y; ++x, ++b)
22
      ::new (b) P(*x);
23
  }
24
  P *a;
25
};
26
 
27
void bar (const V &);
28
 
29
void
30
foo ()
31
{
32
  const P d[2] = { P(), P() };
33
  bar (V (&d[0], &d[2]));
34
}

powered by: WebSVN 2.1.0

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