| 1 |
// { dg-lto-do link } |
| 2 |
// { dg-require-effective-target fpic } |
| 3 |
// { dg-require-effective-target lto_incremental } |
| 4 |
// { dg-lto-options {{-fPIC -flto -Wno-return-type}} } |
| 5 |
// { dg-extra-ld-options "-fPIC -r -nostdlib" } |
| 6 |
|
| 7 |
namespace std __attribute__ ((__visibility__ ("default"))) |
| 8 |
{ |
| 9 |
template<class _CharT> struct char_traits; |
| 10 |
template<typename _CharT, typename _Traits = char_traits<_CharT> > |
| 11 |
class basic_ostream; |
| 12 |
template<typename _CharT, typename _Traits = char_traits<_CharT> > |
| 13 |
class istreambuf_iterator; |
| 14 |
typedef basic_ostream<char> ostream; |
| 15 |
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > |
| 16 |
class num_get; |
| 17 |
struct locale { |
| 18 |
class facet; |
| 19 |
}; |
| 20 |
class locale::facet { |
| 21 |
}; |
| 22 |
enum _Ios_Iostate { _S_beg = 0, _S_cur = 1, _S_end = 2, |
| 23 |
_S_ios_seekdir_end = 1L << 16 }; |
| 24 |
class ios_base { |
| 25 |
public: |
| 26 |
typedef _Ios_Iostate iostate; |
| 27 |
}; |
| 28 |
template<typename _CharT, typename _InIter> |
| 29 |
class num_get : public locale::facet { |
| 30 |
typedef _InIter iter_type; |
| 31 |
template<typename _ValueT> iter_type |
| 32 |
_M_extract_int(iter_type, iter_type, ios_base&, |
| 33 |
ios_base::iostate&, _ValueT&) const; |
| 34 |
virtual iter_type |
| 35 |
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; |
| 36 |
}; |
| 37 |
extern template class num_get<char>; |
| 38 |
template<typename _CharT, typename _Traits> |
| 39 |
class basic_ios : public ios_base { |
| 40 |
typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > |
| 41 |
__num_get_type; |
| 42 |
const __num_get_type* _M_num_get; |
| 43 |
}; |
| 44 |
template<typename _CharT, typename _Traits> |
| 45 |
class basic_ostream : virtual public basic_ios<_CharT, _Traits> { |
| 46 |
public: |
| 47 |
typedef basic_ostream<_CharT, _Traits> __ostream_type; |
| 48 |
__ostream_type& operator<<(double __f) { } |
| 49 |
}; |
| 50 |
typedef double Real; |
| 51 |
class Vector { |
| 52 |
public: |
| 53 |
Real operator[](int n) const { } |
| 54 |
}; |
| 55 |
std::ostream& operator<<(std::ostream& s, const Vector& vec) |
| 56 |
{ |
| 57 |
int i; |
| 58 |
s << vec[i] << ')'; |
| 59 |
} |
| 60 |
} |