// PR tree-optimize/42337 // { dg-do compile } // { dg-options "-O2" } template struct pair { _T2 second; }; template inline const _Tp& max(const _Tp& __a, const _Tp& __b) { } template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { } template struct char_traits {}; template class __normal_iterator { public: typedef _Iterator iterator_type; __normal_iterator& operator++() { } }; template inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { } template class new_allocator { public: typedef _Tp* pointer; typedef const _Tp* const_pointer; }; template class allocator: public new_allocator<_Tp> { public: template struct rebind { typedef allocator<_Tp1> other; }; }; template struct unary_function { }; template struct binary_function { }; template struct less : public binary_function<_Tp, _Tp, bool> { }; template struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { }; template struct _Rb_tree_iterator { typedef _Tp* pointer; pointer operator->() const { } }; template > class _Rb_tree { typedef _Val value_type; public: typedef _Rb_tree_iterator iterator; }; template , typename _Alloc = allocator > > class map { public: typedef _Key key_type; typedef pair value_type; typedef _Compare key_compare; private: typedef typename _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Rep_type::iterator iterator; iterator find(const key_type& __x) { } }; template struct _Vector_base { typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; }; template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef _Vector_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef __normal_iterator iterator; typedef __normal_iterator const_iterator; iterator begin() { } const_iterator begin() const { } const_iterator end() const { } unsigned long size() const { } }; class SSC { public: SSC () {} SSC (const int& cs); }; extern int flag; struct TP { const int cl_; const vector &its_; int max_s_; }; double foo(TP *p); map cs_; template class vector32 { public: typedef T& reference; typedef T* iterator; typedef const T* const_iterator; iterator begin() { return data_; } iterator end() { return data_ + size_; } long unsigned int size() const { return size_; } T* data_; unsigned size_; }; struct SF : public pair { }; template class SFVT { private: typedef vector32 Container; typedef typename Container::const_iterator CI; mutable Container v_; mutable bool sorted_; struct Cmp : public binary_function { }; __attribute__((always_inline)) VALUE IS(const SFVT &sfv) const { if (sfv.v_.size() < v_.size()) { return sfv.IS(*this); } else { VALUE sum = 0.0; CI beg = sfv.v_.begin(); CI end = sfv.v_.end(); for (CI i = v_.begin(); i != v_.end(); ++i) { beg = lower_bound(beg, end, *i, Cmp()); if (beg == end) { return sum; } } } } public: explicit SFVT(const int capacity = 0) : sorted_(true) { } long unsigned int size() const { } __attribute__((always_inline)) VALUE DP(const SFVT &sfv) const { return IS(sfv); } }; class SFV : public SFVT { }; class Edge; extern int flag2; double foo(TP *p) { int nbests_requested = max(p->max_s_, flag); map::iterator it = cs_.find(p->cl_); int* c = &it->second; for (vector::const_iterator iter = p->its_.begin(); iter != p->its_.end(); ++iter) { } vector fb; vector w; int *hg = 0; if (flag2 == 10) { hg = &flag2; } int nr = 0; for (vector::iterator iter = fb.begin(); (iter != fb.end() && nr < nbests_requested); ++iter) { } if (hg) { SFV s_weights; for (int i = 0; i < w.size(); ++i) { } SFV uw; for (int i = 0, j = 0; i < uw.size() && j < s_weights.size(); ) { } const double tc = uw.DP(s_weights); } }