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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Copyright (C) 2000 Free Software Foundation, Inc.
3
// Contributed by Nathan Sidwell 4 February 2001 
4
 
5
// Check primary bases are chosen correctly.
6
 
7
struct A { virtual void Foo () {}};
8
 
9
struct B1 : virtual A {};
10
struct B2 : virtual A {};
11
 
12
struct C : virtual B1 {};
13
 
14
struct D : virtual B1, B2, C {};
15
 
16
int main ()
17
{
18
  D d;
19
  A *ap = &d;
20
  C *cp = &d;
21
 
22
#if __GXX_ABI_VERSION >= 100
23
  if (static_cast  (ap) != static_cast  (cp))
24
    return 1;
25
#endif
26
 
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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