GCC Bugzilla – Attachment 12648 Details for
Bug 29902
[4.2 Regression] ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:644
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
testcase
libjingle0.3-xmppclient.cpp (text/plain), 5.55 KB, created by
Martin Michlmayr
on 2006-11-19 22:31:59 UTC
(
hide
)
Description:
testcase
Filename:
MIME Type:
Creator:
Martin Michlmayr
Created:
2006-11-19 22:31:59 UTC
Size:
5.55 KB
patch
obsolete
>namespace std __attribute__ ((__visibility__ ("default"))) >{ > template < typename _Alloc > class allocator; > template < class _CharT > struct char_traits; > template < typename _CharT, typename _Traits = > char_traits < _CharT >, typename _Alloc = > allocator < _CharT > >class basic_string; > typedef basic_string < char >string; >} >typedef long unsigned int size_t; >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > template < typename _Tp > class new_allocator > { > }; >} >namespace std __attribute__ ((__visibility__ ("default"))) >{ >template < typename _Tp > class allocator:public __gnu_cxx::new_allocator < > _Tp > > { > public:typedef size_t size_type; > template < typename _Tp1 > struct rebind > { > typedef allocator < _Tp1 > other; > }; > }; > template < typename _CharT, typename _Traits, > typename _Alloc > class basic_string > { > typedef typename _Alloc::template rebind < > _CharT >::other _CharT_alloc_type; > typedef typename _CharT_alloc_type::size_type size_type; > private:struct _Rep_base > { > }; > struct _Rep:_Rep_base > { > _CharT *_M_refdata () throw () > { > } > }; > struct _Alloc_hider:_Alloc > { > _Alloc_hider (_CharT * __dat, const _Alloc & __a):_Alloc (__a), > _M_p (__dat) > { > } > _CharT *_M_p; > }; > private:mutable _Alloc_hider _M_dataplus; > static _Rep & _S_empty_rep () > { > } > public:inline basic_string (); > size_type length () const > { > } > const _CharT *data () const > { > } > }; >template < typename _CharT, typename _Traits, typename _Alloc > inline basic_string < _CharT, _Traits, _Alloc >::basic_string ():_M_dataplus (_S_empty_rep ()._M_refdata (), > _Alloc > ()) > { > } > template < typename _CharT, typename _Traits, > typename _Alloc > inline bool operator== (const basic_string < _CharT, > _Traits, _Alloc > &__lhs, > const _CharT * __rhs) > { > } >} >namespace sigslot >{ > class single_threaded > { > }; > template < class mt_policy = single_threaded > class has_slots:public > mt_policy > { > }; >}; >namespace buzz >{ > class XmlConstants > { > public:static const std::string & str_empty (); > }; > class Jid > { > public:explicit Jid (); > const std::string & node () const > { > return !data_ ? XmlConstants::str_empty () : data_->node_name_; > } > class Data > { > public:Data ():refcount_ (1) > { > } > const std::string node_name_; > private:int refcount_; > }; > Data *data_; > }; > template < typename T > class scoped_ptr > { > private:T * ptr; > public:typedef T element_type; > explicit scoped_ptr (T * p = 0):ptr (p) > { > } > T *operator-> () const > { > } > T *get () const > { > } > }; >} >namespace buzz >{ > class SaslHandler; > enum XmppReturnStatus > { > }; > class XmppOutputHandler > { > }; > class XmppSessionHandler > { > }; > class XmppEngine > { > public:static XmppEngine *Create (); > enum Error > { > ERROR_NONE = > 0, ERROR_XML, ERROR_STREAM, ERROR_VERSION, ERROR_UNAUTHORIZED, > }; > virtual const Jid & GetUser () = 0; > virtual XmppReturnStatus SetSaslHandler (SaslHandler * h) = 0; > }; > class AsyncSocket > { > }; > class XmppPassword > { > }; > class FormatXmppPassword > { > public:FormatXmppPassword () > { > } > void Append (const std::string & text) > { > Append (text.data (), text.length ()); > } > void Append (const char *data, size_t length) > { > EnsureStorage (length_ + length + 1); > } > void EnsureStorage (size_t n) > { > size_t old_capacity = capacity_; > char *old_storage = storage_; > for (;;) > { > capacity_ *= 2; > break; > } > storage_ = new char[capacity_]; > { > for (size_t i = 1; i < old_capacity; i++) > { > old_storage[i] = old_storage[i - 1]; > } > } > } > ~FormatXmppPassword () > { > { > for (size_t i = 1; i < capacity_; i++) > { > } > } > } > private:char *storage_; > size_t capacity_; > size_t length_; > }; > class Task > { > }; > class XmppClient:public Task, public sigslot::has_slots <> > { > virtual int ProcessStart (); > class Private; > scoped_ptr < Private > d_; > }; > class SaslMechanism > { > }; > class SaslPlainMechanism:public SaslMechanism > { > public:SaslPlainMechanism (const buzz::Jid user_jid, > const XmppPassword & password):user_jid_ (user_jid), > password_ (password) > { > FormatXmppPassword credential; > credential.Append (user_jid_.node ()); > } > private: Jid user_jid_; > XmppPassword password_; > }; > class SaslHandler > { > }; > class PreXmppAuth:public SaslHandler > { > }; > class PlainSaslHandler:public SaslHandler > { > public:PlainSaslHandler (const Jid & jid, > const XmppPassword & password):jid_ (jid), > password_ (password) > { > } > virtual SaslMechanism *CreateSaslMechanism (const std::string & mechanism) > { > { > return new SaslPlainMechanism (jid_, password_); > } > } > private:Jid jid_; > XmppPassword password_; > }; > class XmppClient::Private:public sigslot::has_slots <>, > public XmppSessionHandler, public XmppOutputHandler > { > public:Private (XmppClient * client):client_ (client), socket_ (__null), > pre_engine_error_ (XmppEngine::ERROR_NONE), signal_closed_ (false) > { > } > XmppClient *const client_; > scoped_ptr < AsyncSocket > socket_; > scoped_ptr < XmppEngine > engine_; > XmppPassword pass_; > XmppEngine::Error pre_engine_error_; > bool signal_closed_; > }; > int XmppClient::ProcessStart () > { > { > d_->engine_-> > SetSaslHandler (new > PlainSaslHandler (d_->engine_->GetUser (), > d_->pass_)); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 29902
: 12648