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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// Origin: Steven Parkes 
3
 
4
typedef __SIZE_TYPE__ size_t;
5
 
6
class UUId {};
7
 
8
template  class MetaClass;
9
 
10
class TypeInfo;
11
 
12
struct MetaClassGeneric
13
{
14
                                MetaClassGeneric( TypeInfo& );
15
};
16
 
17
struct TypeInfo
18
{
19
                        void    (*constructor)( void* );
20
                        void    initialize( void* );
21
};
22
 
23
template 
24
class TypeIDInit {
25
public:
26
                                TypeIDInit();
27
                 static void    initialize();
28
             static TypeInfo    info;
29
                  static int    storage[];
30
                 static void    metaclassConstructor( void* );
31
};
32
 
33
template 
34
TypeInfo TypeIDInit::info =
35
{
36
  TypeIDInit::metaclassConstructor
37
};
38
 
39
template 
40
inline
41
TypeIDInit::TypeIDInit()
42
{
43
  info.initialize(storage);
44
}
45
 
46
template 
47
class NameInfo : public MetaClassGeneric {
48
public:
49
                                NameInfo()
50
                                : MetaClassGeneric( TypeIDInit::info ) {}
51
};
52
 
53
template <>
54
class MetaClass
55
: public NameInfo
56
{
57
};
58
 
59
extern "C++"
60
inline void *operator new(size_t, void *place) throw() { return place; }
61
 
62
template 
63
void
64
TypeIDInit::metaclassConstructor( void* place )
65
{
66
  new ( place ) MetaClass;
67
}
68
 
69
template class   TypeIDInit   ;
70
 

powered by: WebSVN 2.1.0

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