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/] [inherit/] [covariant8.C] - Blame information for rev 308

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

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2002 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 31 Dec 2002 
5
 
6
// ICE with covariant thunks.
7
 
8
struct c0 {};
9
 
10
struct c1 : virtual c0
11
{
12
  virtual c0 &f2 ();
13
};
14
 
15
struct c2
16
{
17
  int m;
18
};
19
 
20
struct c3 : virtual c0, virtual c1, c2
21
{
22
  virtual c1 &f2 ();
23
};
24
 
25
c1 &c3::f2 ()
26
{
27
  throw 0;
28
}
29
 
30
struct c4 : virtual c3, virtual c0, virtual c1 {};
31
 
32
struct c8 : virtual c2, virtual c0 {};
33
 
34
struct c12 : virtual c4, virtual c3, virtual c8 {};

powered by: WebSVN 2.1.0

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