Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr69241-4.C
blob2805b0cd67541d1b4407209f03267af7d03b9c71
1 // PR ipa/69241
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-O2 -Wno-return-type" }
5 template <typename> class A;
6 struct B {
7   using pointer = int *;
8 };
9 template <typename _CharT, typename = A<_CharT>> class basic_string {
10   long _M_string_length;
11   enum { _S_local_capacity = 15 } _M_local_buf[_S_local_capacity];
12   B::pointer _M_local_data;
14 public:
15   ~basic_string();
17 template <typename _CharT, typename _Traits, typename _Alloc>
18 int operator<<(_Traits, basic_string<_CharT, _Alloc>);
19 class C {
20   basic_string<A<char>> _M_string;
22 class D {
23   C _M_stringbuf;
25 class F {
26   int stream;
27   D stream_;
29 class G {
30 public:
31   void operator&(int);
33 class H {
34 public:
35   H(unsigned);
36   H(H &&);
37   bool m_fn1();
39 class I {
40   void m_fn2(const int &&);
41   static H m_fn3(const int &);
43 template <typename Functor> void Bind(Functor);
44 class J {
45 public:
46   static basic_string<char> m_fn4();
48 int a;
49 void I::m_fn2(const int &&) { Bind(m_fn3); }
50 H I::m_fn3(const int &) {
51   !false ? (void)0 : G() & F() << J::m_fn4();
52   H b(a);
53   if (b.m_fn1())
54     F();