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/] [pr19317-2.C] - Blame information for rev 315

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/19317
2
// { dg-options "-O2" }
3
// { dg-do run }
4
 
5
extern "C" void abort (void);
6
 
7
struct A
8
{
9
  A () { d = e = 0; f = -1; }
10
  A (int x) : d (0), e (0), f (x) { }
11
  A b () const;
12
  int d;
13
  int e;
14
  int f;
15
};
16
 
17
A
18
A::b () const
19
{
20
  A t;
21
  t.f = 10 + this->f;
22
  return t;
23
}
24
 
25
int
26
main ()
27
{
28
  A a (100);
29
  a = a.b ();
30
  if (a.f != 110)
31
    abort ();
32
}

powered by: WebSVN 2.1.0

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