Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / lto / pr65316_0.C
blobcccd0db7d8ee75a8e252a3216488360edb886efc
1 // { dg-lto-do link }
2 // { dg-lto-options { { -flto -std=c++11 -g2 -fno-lto-odr-type-merging -O2 } } }
3 // { dg-extra-ld-options "-r -nostdlib -O2 -fno-lto-odr-type-merging" }
4 namespace std
6   typedef long unsigned int size_t;
8 extern "C"
10   typedef struct
11   {
12   } __mbstate_t;
14 namespace std __attribute__ ((__visibility__ ("default")))
16   template < class _CharT > struct char_traits;
19 typedef __mbstate_t mbstate_t;
20 namespace std __attribute__ ((__visibility__ ("default")))
22   template < typename _CharT, typename _Traits =
23     char_traits < _CharT > >class basic_ostream;
24   typedef basic_ostream < char >ostream;
27 using namespace std;
28 class Cstring
30 public:
31   Cstring (const char *str, int l = 0);
33 extern ostream & operator << (ostream & os, const Cstring & string);
34 class Foo_Log_Handler
36   virtual int write_message (const char *msg, size_t msg_len, int channel,
37                              int level) = 0;
39 class Foo_Log_Handler_Stream:public Foo_Log_Handler
41   virtual int write_message (const char *msg, size_t msg_len, int channel,
42                              int level) override;
43   Cstring m_filename;
45 namespace std __attribute__ ((__visibility__ ("default")))
47   template <> struct char_traits <char >
48   {
49     typedef mbstate_t state_type;
50   };
51   enum _Ios_Fmtflags
52   {
53   };
54   enum _Ios_Iostate
55   {
56   };
57   class ios_base
58   {
59   public:
60     typedef _Ios_Iostate iostate;
61   };
64 namespace std __attribute__ ((__visibility__ ("default")))
66   template < typename _CharT > class __ctype_abstract_base
67   {
68   };
69   template < typename _CharT > class ctype
70   {
71   public:
72     typedef char char_type;
73     mutable char _M_widen_ok;
74     char_type widen (char __c) const
75     {
76       if (_M_widen_ok)
77         return this->do_widen (__c);
78     }
79     virtual char_type do_widen (char __c) const
80     {
81     }
82   };
83   template < typename _Facet >
84     inline const _Facet & __check_facet (const _Facet * __f)
85   {
86   }
87 template < typename _CharT, typename _Traits > class basic_ios:public
88     ios_base
89   {
90     typedef _CharT char_type;
91     typedef ctype < _CharT > __ctype_type;
92     const __ctype_type *_M_ctype;
93   public:
94     iostate rdstate ()const
95     {
96     }
97     bool good () const
98     {
99     }
100     char_type widen (char __c) const
101     {
102       return __check_facet (_M_ctype).widen (__c);
103     }
104   };
105 template < typename _CharT, typename _Traits > class basic_ostream:virtual public basic_ios < _CharT,
106     _Traits
107     >
108   {
109   public:
110     typedef _CharT char_type;
111     typedef _Traits traits_type;
112     typedef basic_ostream < _CharT, _Traits > __ostream_type;
113     __ostream_type & operator<< (__ostream_type & (*__pf) (__ostream_type &))
114     {
115       return __pf (*this);
116     }
117     __ostream_type & put (char_type __c);
118   };
119   template < typename _CharT,
120     typename _Traits > inline basic_ostream < _CharT,
121     _Traits > &endl (basic_ostream < _CharT, _Traits > &__os)
122   {
123     return flush (__os.put (__os.widen ('\n')));
124   }
125   template < typename _CharT,
126     typename _Traits > inline basic_ostream < _CharT,
127     _Traits > &flush (basic_ostream < _CharT, _Traits > &__os)
128   {
129   }
130   extern ostream cerr;
134 Foo_Log_Handler_Stream::write_message (const char *msg, size_t msg_len, int,
135                                          int level)
137   {
138     {
139       cerr << "FATAL: cannot write into log file: " << m_filename << endl;
140     }
141   }