3 // { dg-additional-options "-std=c++11 -Ofast" }
6 template <typename> struct A;
7 template <typename _Tp> struct A<_Tp *> { typedef _Tp reference; };
9 template <typename _Iterator> class B {
11 typename A<_Iterator>::reference operator*();
14 template <typename> class C;
15 template <typename> struct D;
17 template <typename _Tp> struct D<C<_Tp>> {
18 using value_type = _Tp;
19 using const_pointer = _Tp *;
20 template <typename _Up> using rebind_alloc = C<_Up>;
23 template <typename _Alloc> struct __alloc_traits : D<_Alloc> {
24 typedef D<_Alloc> _Base_type;
25 typedef typename _Base_type::value_type &reference;
26 template <typename _Tp> struct F {
27 typedef typename _Base_type::template rebind_alloc<_Tp> other;
31 template <typename _Tp, typename _Alloc> struct G {
32 typedef typename __alloc_traits<_Alloc>::template F<_Tp>::other
38 void fn1() __attribute__((__noreturn__));
39 template <typename _Tp, typename _Alloc = C<_Tp>> class H {
40 typedef __alloc_traits<typename G<_Tp, _Alloc>::_Tp_alloc_type> _Alloc_traits;
41 typedef typename _Alloc_traits::reference reference;
44 B<typename _Alloc_traits::const_pointer> m_fn1();
46 reference operator[](unsigned);
47 reference m_fn3(unsigned){
50 } // { dg-warning "control reaches end of non-void function" }
55 H<unsigned, C<int>> e;
61 c.m_fn3(f)[0][g] * a + -*(e).m_fn1() * b + (*c[f].m_fn1()).m_fn3(g);