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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [ambig3.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
// Copyright (C) 2000 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 23 June 2000 
5
 
6
// Origin GNATS bug report 69 from Glenn Ammons 
7
//
8
// A base which derives a virtual base hides declarations in the virtual base,
9
// even if that virtual base is accessible via another path [10.2]/6. Make
10
// sure that non-virtual bases of the virtual base are also hidden, not matter
11
// what order bases are declared in.
12
 
13
struct A {int a;};
14
struct B : A {};
15
 
16
struct L1 : virtual B { int a; };
17
struct L2 : virtual A { int a; };
18
 
19
struct R1 : virtual B {};
20
struct R2 : virtual A {};
21
 
22
struct C1 : R1, L1 {};
23
struct C2 : R2, L2 {};
24
 
25
struct D1 : L1, R1 {};
26
struct D2 : L2, R2 {};
27
 
28
void fn (C1 *c1, D1 *d1, C2 *c2, D2 *d2)
29
{
30
  c1->a = 1;
31
  d1->a = 1;
32
  c2->a = 1;
33
  d2->a = 1;
34
}

powered by: WebSVN 2.1.0

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