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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [assign1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/13009
2
// { dg-do run }
3
 
4
struct A {
5
  char a;
6
};
7
 
8
struct B: public virtual A {
9
  #if 0 // this piece of code works around the problem
10
  B& operator= (const B& other)
11
  {
12
    A::operator= (other);
13
  }
14
  #endif
15
};
16
 
17
struct C: public B {
18
  char c;
19
};
20
 
21
int main() {
22
  B b;
23
  b.a = 'b';
24
  C c;
25
  c.a = c.c = 'c';
26
 
27
  c.B::operator= (b);
28
  if (c.a != 'b' || c.c != 'c')
29
    return 1;
30
}

powered by: WebSVN 2.1.0

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