3 // { dg-options "-O2" }
4 // { dg-options "-O3 -mavx -fPIC -mtune=core2" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } }
8 template <class> struct char_traits;
10 typedef struct { union { char __wchb[4]; }; } mbstate_t;
13 template <typename _StateT> struct fpos
17 fpos (long long):_M_off (), _M_state () { }
18 _StateT state () { return _M_state; }
20 typedef fpos <mbstate_t> streampos;
24 template <> struct char_traits <char>
26 typedef streampos pos_type;
27 typedef long long off_type;
28 typedef mbstate_t state_type;
31 struct pthread_mutex_t;
34 enum _Ios_Openmode { _S_in = 3, _S_out };
35 enum _Ios_Seekdir { _S_beg };
38 typedef _Ios_Openmode openmode;
39 static const openmode in = _S_in;
40 static const openmode out = _S_out;
41 typedef _Ios_Seekdir seekdir;
42 static const seekdir beg = _S_beg;
44 template < typename _CharT, typename > struct basic_streambuf
46 typedef _CharT char_type;
47 char_type * _M_in_beg;
48 char_type *eback () { return _M_in_beg; }
49 char_type *gptr () { return 0; }
54 typedef struct pthread_mutex_t __c_lock;
55 template <typename> class __basic_file;
56 template <> struct __basic_file <char>
58 __basic_file (__c_lock * = 0);
61 template <typename _CharT, typename _Traits> struct basic_filebuf : public basic_streambuf <_CharT, _Traits>
63 typedef _CharT char_type;
64 typedef _Traits traits_type;
65 typedef typename traits_type::pos_type pos_type;
66 typedef typename traits_type::off_type off_type;
67 typedef __basic_file < char >__file_type;
68 typedef typename traits_type::state_type __state_type;
70 char_type *_M_pback_cur_save;
72 void _M_destroy_pback () throw ()
74 _M_pback_cur_save += this->gptr () != this->eback ();
75 _M_pback_init = false;
77 bool is_open () throw () { return _M_file.is_open (); }
78 pos_type seekpos (pos_type, ios_base::openmode = ios_base::in | ios_base::out);
79 pos_type _M_seek (off_type, ios_base::seekdir, __state_type);
81 template <typename _CharT, typename _Traits>
82 typename basic_filebuf <_CharT, _Traits>::pos_type
83 basic_filebuf <_CharT, _Traits>::seekpos (pos_type __pos, ios_base::openmode)
85 pos_type __ret = (off_type ());
89 __ret = _M_seek (off_type (), ios_base::beg, __pos.state ());
93 template class basic_filebuf <char, char_traits <char> >;