1 |
301 |
jeremybenn |
// PR tree-optimization/22444
|
2 |
|
|
// When creating SFT's, we shouldn't add the original variable
|
3 |
|
|
// to the addressable vars list, because this may cause false aliasing
|
4 |
|
|
// with the subvars leading to the subvars not being renamed when they should
|
5 |
|
|
// { dg-do compile }
|
6 |
|
|
// { dg-options "-O2" }
|
7 |
|
|
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
8 |
|
|
__extension__ typedef __SIZE_TYPE__ size_t;
|
9 |
|
|
namespace std
|
10 |
|
|
{
|
11 |
|
|
template struct pair
|
12 |
|
|
{
|
13 |
|
|
_T1 first;
|
14 |
|
|
_T2 second;
|
15 |
|
|
pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { }
|
16 |
|
|
};
|
17 |
|
|
}
|
18 |
|
|
namespace __gnu_internal
|
19 |
|
|
{
|
20 |
|
|
typedef char __one;
|
21 |
|
|
template __one __test_type(int _Tp::*);
|
22 |
|
|
}
|
23 |
|
|
namespace std
|
24 |
|
|
{
|
25 |
|
|
template struct ___is_pod
|
26 |
|
|
{
|
27 |
|
|
enum { __value = (sizeof(__gnu_internal::__test_type<_Tp>(0))!= sizeof(__gnu_internal::__one)) };
|
28 |
|
|
};
|
29 |
|
|
template struct iterator
|
30 |
|
|
{ };
|
31 |
|
|
template struct iterator_traits
|
32 |
|
|
{
|
33 |
|
|
typedef typename _Iterator::difference_type difference_type;
|
34 |
|
|
};
|
35 |
|
|
template class reverse_iterator : public iterator::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference>
|
36 |
|
|
{
|
37 |
|
|
typedef _Iterator iterator_type;
|
38 |
|
|
typedef typename iterator_traits<_Iterator>::difference_type difference_type;
|
39 |
|
|
typedef typename iterator_traits<_Iterator>::reference reference;
|
40 |
|
|
reverse_iterator operator+(difference_type __n) const {}
|
41 |
|
|
reverse_iterator& operator+=(difference_type __n) { }
|
42 |
|
|
reference operator[](difference_type __n) const { }
|
43 |
|
|
};
|
44 |
|
|
}
|
45 |
|
|
namespace __gnu_cxx
|
46 |
|
|
{
|
47 |
|
|
template class __pool;
|
48 |
|
|
template class _PoolTp, bool _Thread> struct __common_pool_policy;
|
49 |
|
|
template class __mt_alloc_base
|
50 |
|
|
{
|
51 |
|
|
typedef ptrdiff_t difference_type;
|
52 |
|
|
typedef _Tp* pointer;
|
53 |
|
|
};
|
54 |
|
|
template > class __mt_alloc : public __mt_alloc_base<_Tp>
|
55 |
|
|
{
|
56 |
|
|
typedef size_t size_type;
|
57 |
|
|
};
|
58 |
|
|
}
|
59 |
|
|
namespace std
|
60 |
|
|
{
|
61 |
|
|
template struct allocator:public __gnu_cxx::__mt_alloc<_Tp>
|
62 |
|
|
{
|
63 |
|
|
template struct rebind
|
64 |
|
|
{
|
65 |
|
|
typedef allocator<_Tp1> other;
|
66 |
|
|
};
|
67 |
|
|
};
|
68 |
|
|
template struct unary_function { };
|
69 |
|
|
template struct binary_function
|
70 |
|
|
{
|
71 |
|
|
typedef _Arg2 second_argument_type;
|
72 |
|
|
};
|
73 |
|
|
template struct less : public binary_function<_Tp, _Tp, bool>
|
74 |
|
|
{
|
75 |
|
|
bool operator()(const _Tp& __x, const _Tp& __y) const { }
|
76 |
|
|
};
|
77 |
|
|
template struct _Identity : public unary_function<_Tp,_Tp> { };
|
78 |
|
|
struct _Rb_tree_node_base
|
79 |
|
|
{
|
80 |
|
|
typedef _Rb_tree_node_base* _Base_ptr;
|
81 |
|
|
typedef const _Rb_tree_node_base* _Const_Base_ptr;
|
82 |
|
|
_Base_ptr _M_right;
|
83 |
|
|
static _Base_ptr _S_minimum(_Base_ptr __x) { }
|
84 |
|
|
static _Base_ptr _S_maximum(_Base_ptr __x) { }
|
85 |
|
|
};
|
86 |
|
|
template struct _Rb_tree_node { };
|
87 |
|
|
template struct _Rb_tree_iterator
|
88 |
|
|
{
|
89 |
|
|
typedef _Tp* pointer;
|
90 |
|
|
typedef _Rb_tree_iterator<_Tp> _Self;
|
91 |
|
|
typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
|
92 |
|
|
pointer operator->() const { }
|
93 |
|
|
_Self operator++(int) { }
|
94 |
|
|
_Base_ptr _M_node;
|
95 |
|
|
};
|
96 |
|
|
template struct _Rb_tree_const_iterator
|
97 |
|
|
{
|
98 |
|
|
typedef const _Tp* pointer;
|
99 |
|
|
typedef _Rb_tree_iterator<_Tp> iterator;
|
100 |
|
|
typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
|
101 |
|
|
_Rb_tree_const_iterator(const iterator& __it) : _M_node(__it._M_node) { }
|
102 |
|
|
_Base_ptr _M_node;
|
103 |
|
|
};
|
104 |
|
|
template > struct _Rb_tree
|
105 |
|
|
{
|
106 |
|
|
typedef typename _Alloc::template rebind >::other _Node_allocator;
|
107 |
|
|
typedef _Rb_tree_node_base* _Base_ptr;
|
108 |
|
|
typedef const _Rb_tree_node_base* _Const_Base_ptr;
|
109 |
|
|
typedef std::_Rb_tree_node<_Val> _Rb_tree_node;
|
110 |
|
|
typedef _Key key_type;
|
111 |
|
|
typedef _Val value_type;
|
112 |
|
|
typedef value_type* pointer;
|
113 |
|
|
typedef _Rb_tree_node* _Link_type;
|
114 |
|
|
template::__value> struct _Rb_tree_impl
|
115 |
|
|
: _Node_allocator
|
116 |
|
|
{
|
117 |
|
|
_Rb_tree_node_base _M_header;
|
118 |
|
|
};
|
119 |
|
|
_Rb_tree_impl<_Compare> _M_impl;
|
120 |
|
|
typedef _Rb_tree_iterator iterator;
|
121 |
|
|
typedef _Rb_tree_const_iterator const_iterator;
|
122 |
|
|
typedef std::reverse_iterator reverse_iterator;
|
123 |
|
|
pair insert_unique(const value_type& __x);
|
124 |
|
|
};
|
125 |
|
|
template class set
|
126 |
|
|
{
|
127 |
|
|
typedef _Key key_type;
|
128 |
|
|
typedef _Key value_type;
|
129 |
|
|
typedef _Compare key_compare;
|
130 |
|
|
typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
|
131 |
|
|
typedef _Rb_tree<_Key, value_type, _Identity, key_compare, _Key_alloc_type> _Rep_type;
|
132 |
|
|
_Rep_type _M_t;
|
133 |
|
|
typedef typename _Rep_type::const_iterator iterator;
|
134 |
|
|
std::pair insert(const value_type& __x)
|
135 |
|
|
{
|
136 |
|
|
std::pair __p = _M_t.insert_unique(__x);
|
137 |
|
|
return std::pair(__p.first, __p.second);
|
138 |
|
|
}
|
139 |
|
|
};
|
140 |
|
|
}
|
141 |
|
|
template class std::set, std::allocator >;
|