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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
 
3
// Copyright (C) 2005 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 13 Oct 2005 
5
 
6
// PR 23984:ICE
7
// Origin:  Andrew Pinski pinskia@gcc.gnu.org
8
 
9
struct B
10
{
11
  virtual void Foo ();
12
};
13
 
14
void B::Foo ()
15
{
16
}
17
 
18
struct D : virtual B
19
{
20
};
21
 
22
struct E
23
{
24
  B *ptr;
25
 
26
  E (B *);
27
};
28
 
29
static B *ptr;
30
 
31
E::E (B *ptr_)
32
  :ptr (ptr_)
33
{
34
}
35
 
36
struct G : D, E
37
{
38
  G ();
39
};
40
 
41
G::G ()
42
  : E (this)
43
{
44
}
45
 
46
int main ()
47
{
48
  G object;
49
 
50
  return object.ptr != &object;
51
}

powered by: WebSVN 2.1.0

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