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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [opeq5.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Testcase for tricky synthesized op= in complex inheritance situation.
3
// This used to test whether the virtual base was copy-assigned only once.
4
// That feature is not required by ISO C++, so the test now only checks
5
// whether the vbase is assigned at all.
6
 
7
int count = 0;
8
extern "C" int printf (const char *, ...);
9
 
10
class A {
11
 public:
12
  A& operator = (const A&) { count++; return *this; }
13
};
14
 
15
class B: virtual private A { };
16
class C: virtual public A { };
17
class D: public B, public C { };
18
 
19
int main()
20
{
21
  D a, b;
22
  a = b;
23
  printf ("%d\n",count);
24
  if (count == 0)
25
    return 1;
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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