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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr51596.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR tree-optimization/51596
2
// { dg-do compile }
3
// { dg-options "-O -fnon-call-exceptions" }
4
 
5
struct A { float v[2]; };
6
struct B { int v[2]; };
7
 
8
struct C
9
{
10
  B c;
11
  C f ()
12
  {
13
    B b;
14
    for (int i = 0; i < 2; i++)
15
      b.v[i] = c.v[i];
16
    return *this;
17
  }
18
};
19
 
20
struct D
21
{
22
  A d;
23
  D (B x)
24
  {
25
    for (int i = 0; i < 2; i++)
26
      d.v[i] = x.v[i];
27
  }
28
};
29
 
30
int bar ();
31
 
32
C i;
33
 
34
void
35
foo ()
36
{
37
  while (bar ())
38
    D (i.f ().c);
39
}

powered by: WebSVN 2.1.0

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