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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [crash-8.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
// Origin: PR c++/42797
2
// { dg-options "-g -O2 -std=c++0x" }
3
 
4
template     struct integral_constant     {
5
    static const _Tp value = __v;
6
};
7
 
8
template     _Tp declval();
9
 
10
template
11
class __is_constructible_helper  {
12
};
13
 
14
template
15
class __is_constructible_helper<_Tp, _Arg>  {
16
 
17
    template
18
    static decltype(static_cast<_Tp1>(declval<_Arg1>()), char())  __test(int);
19
public:
20
    static const bool __value = sizeof(__test<_Tp, _Arg>(0)) == 1;
21
};
22
 
23
template
24
struct is_constructible     : public integral_constant::__value>     { };
25
 
26
template
27
struct enable_if  { };
28
 
29
template
30
struct enable_if     {
31
    typedef _Tp type;
32
};
33
 
34
template     struct pair     {
35
    _T1 first;
36
    _T2 second;
37
 
38
    template::value>::type>
39
    pair(const _T1& __x, _U2&& __y)  : first(__x),
40
                                       second(__y) { }
41
};
42
 
43
namespace __gnu_cxx {
44
template
45
class new_allocator     {
46
public:
47
    new_allocator() throw() { }
48
    new_allocator(const new_allocator&) throw() { }
49
};
50
}
51
 
52
template
53
class allocator: public __gnu_cxx::new_allocator<_Tp>     {
54
public:
55
 
56
    template
57
    struct rebind  {
58
        typedef allocator<_Tp1> other;
59
    };
60
};
61
 
62
 
63
template     struct _Vector_base     {
64
    typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
65
 
66
    struct _Vector_impl       : public _Tp_alloc_type   {
67
        _Vector_impl()
68
        { }
69
    };
70
public:
71
 
72
    _Vector_impl _M_impl;
73
};
74
 
75
template >
76
class vector : protected _Vector_base<_Tp, _Alloc> {
77
    typedef _Alloc allocator_type;
78
public:
79
    vector()       { }
80
    explicit       vector(int, const allocator_type& __a = allocator_type())
81
    {
82
    }
83
};
84
 
85
 
86
template 
87
class map {
88
    typedef _Key key_type;
89
    typedef _Tp mapped_type;
90
    typedef pair value_type;
91
public:
92
 
93
    void insert(const value_type& __x)
94
    {
95
    }
96
 
97
    mapped_type&       operator[](const key_type& __k)       {
98
        insert(value_type(__k, mapped_type()));
99
    }
100
 
101
};
102
 
103
struct Foo {
104
    Foo() {}      template     Foo(Tp *p) {} };
105
void foo() {
106
    map > the_map;
107
    the_map[1] = vector();
108
}
109
 

powered by: WebSVN 2.1.0

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