2 // { dg-options "-ftracer -fno-tree-dce -fno-tree-sra" }
4 struct bidirectional_iterator_tag
6 struct random_access_iterator_tag:bidirectional_iterator_tag
8 template < typename _Category, typename, typename _Distance, typename > struct iterator
10 typedef _Distance difference_type;
12 template < typename _Iterator > struct iterator_traits
14 typedef typename _Iterator::difference_type difference_type;
16 template < typename _Tp > struct iterator_traits <_Tp * >
18 typedef random_access_iterator_tag iterator_category;
19 typedef _Tp value_type;
20 typedef int difference_type;
21 typedef _Tp reference;
23 template < typename _Iterator > class reverse_iterator:
25 iterator < typename iterator_traits < _Iterator >::iterator_category,
26 typename iterator_traits < _Iterator >::value_type,
27 typename iterator_traits < _Iterator >::difference_type, typename iterator_traits < _Iterator >::reference >
31 typedef _Iterator iterator_type;
32 reverse_iterator (const reverse_iterator & __x):current (__x.current)
38 reverse_iterator operator++ ()
51 (reverse_iterator < _Iterator > __x, reverse_iterator < _Iterator > __y)
53 return __x.base () == __y.base ();
67 - (reverse_iterator < _Iterator >, reverse_iterator < _Iterator >)
76 (_RandomAccessIterator
77 __first, _RandomAccessIterator __last)
83 >::difference_type __trip_count (__last - __first);
84 for (; __trip_count; --__trip_count)
88 typedef reverse_iterator < int* > _ForwardIterator1;
98 __first1 = __find (__first1, __last1);
99 if (__first1 == __last1)