1 // { dg-do compile }
2 // { dg-options "-fpermissive" }
3 // { dg-additional-options "-Wno-return-type" }
4 typedef long unsigned int size_t;
5        typedef bool _CORBA_Boolean;
6          typedef unsigned int _CORBA_ULong;
7              template <class T> class _CORBA_Sequence {
8      public:   typedef _CORBA_Sequence<T> T_seq;
9         inline T_seq &operator= (const T_seq &s)   {
10          for (unsigned long i=0;
11      i < pd_len;
12      i++) {
13        }
14        }
15        _CORBA_ULong pd_len;
16      };
17              template <class T> class _CORBA_Unbounded_Sequence : public _CORBA_Sequence<T> {
_CORBA_Unbounded_Sequence_WChar()18         inline _CORBA_Unbounded_Sequence_WChar() { // { dg-warning "forbids declaration" }
19        }
20      };
21        class _CORBA_ObjRef_Var_base {
22      };
23          template <class T, class T_Helper> class _CORBA_ObjRef_Var : public _CORBA_ObjRef_Var_base {
24      public:   typedef T* ptr_t;
25        typedef T* T_ptr;
_CORBA_ObjRef_Var()26         inline _CORBA_ObjRef_Var() : pd_objref(T_Helper::_nil()) {
27     }
_CORBA_ObjRef_Var(T_ptr p)28        inline _CORBA_ObjRef_Var(T_ptr p) : pd_objref(p) {
29        }
30       private:   T_ptr pd_objref;
31       };
32         class omniLocalIdentity;
33          class omniObjRef {
34      };
35             class omniServant {
36       public:   virtual ~omniServant();
37         virtual void* _ptrToInterface(const char* repoId);
38           };
39          namespace CORBA  {
40       class NVList {
41      };
42       class Object {
43      };
44       struct StructMember {
45      };
46       class StructMemberSeq : public _CORBA_Unbounded_Sequence< StructMember > {
47         };
48       class _objref_IRObject :   public virtual ::CORBA::Object,   public virtual omniObjRef {
49      };
50       class _impl_IRObject :   public virtual omniServant {
51       };
52      class _objref_Container;
53       typedef _objref_Container* Container_ptr;
54       class _impl_Contained :   public virtual _impl_IRObject {
55      };
56      class _objref_ExceptionDef;
57       typedef _objref_ExceptionDef* ExceptionDef_ptr;
58       class ExceptionDef_Helper {
59      public:   typedef ExceptionDef_ptr _ptr_type;
60         static _ptr_type _nil();
61      };
62       typedef _CORBA_ObjRef_Var<_objref_ExceptionDef, ExceptionDef_Helper> ExceptionDef_var;
63       class Container {
64      public:    typedef Container_ptr _ptr_type;
65         static const char* _PD_repoId;
66        };
67       class _objref_Container :   public virtual _objref_IRObject {
68        ExceptionDef_ptr create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members);
69      };
70       class _impl_Container :   public virtual _impl_IRObject {
71      public:   virtual ~_impl_Container();
72        virtual ExceptionDef_ptr create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members) = 0;
73      };
74       class _impl_IDLType :   public virtual _impl_IRObject {
75      };
76       class _impl_TypedefDef :   public virtual _impl_Contained,   public virtual _impl_IDLType {
77      };
78       class _impl_StructDef :   public virtual _impl_TypedefDef,   public virtual _impl_Container {
79       };
80            }
81           namespace PortableServer {
82             class ServantBase : public virtual omniServant {
83     };
84              }
85          namespace POA_CORBA {
86            class IRObject :   public virtual CORBA::_impl_IRObject,   public virtual ::PortableServer::ServantBase {
87      };
88       class Contained :   public virtual CORBA::_impl_Contained,   public virtual IRObject {
89      };
90       class Container :   public virtual CORBA::_impl_Container,   public virtual IRObject {
91      };
92       class IDLType :   public virtual CORBA::_impl_IDLType,   public virtual IRObject {
93      };
94       class TypedefDef :   public virtual CORBA::_impl_TypedefDef,   public virtual Contained,     public virtual IDLType {
95      };
96       class StructDef :   public virtual CORBA::_impl_StructDef,   public virtual TypedefDef,     public virtual Container {
97      public:   virtual ~StructDef();
98      };
99        }
100          namespace omni {
101      class omniOrbPOA;
102      class giopAddress;
103      }
104              class omniCallDescriptor {
105      public:   typedef void (*LocalCallFn)(omniCallDescriptor*, omniServant*);
omniCallDescriptor(LocalCallFn lcfn,const char * op_,int op_len_,_CORBA_Boolean oneway,const char * const * user_excns_,int n_user_excns_,_CORBA_Boolean is_upcall_)106         inline omniCallDescriptor(LocalCallFn lcfn, const char* op_,        int op_len_, _CORBA_Boolean oneway,        const char*const* user_excns_,        int n_user_excns_,                             _CORBA_Boolean is_upcall_)     : pd_localCall(lcfn),       pd_op(op_), pd_oplen(op_len_),       pd_user_excns(user_excns_),       pd_n_user_excns(n_user_excns_),       pd_is_oneway(oneway),       pd_is_upcall(is_upcall_),       pd_contains_values(0),       pd_first_address_used(0),       pd_current_address(0),       pd_objref(0),       pd_poa(0),       pd_localId(0),       pd_deadline_secs(0),       pd_deadline_nanosecs(0) {
107     }
108       private:   LocalCallFn pd_localCall;
109        const char* pd_op;
110        size_t pd_oplen;
111        const char*const* pd_user_excns;
112        int pd_n_user_excns;
113        _CORBA_Boolean pd_is_oneway;
114        _CORBA_Boolean pd_is_upcall;
115        _CORBA_Boolean pd_contains_values;
116         const omni::giopAddress* pd_first_address_used;
117        const omni::giopAddress* pd_current_address;
118            omniObjRef* pd_objref;
119         omni::omniOrbPOA* pd_poa;
120        omniLocalIdentity* pd_localId;
121               unsigned long pd_deadline_secs;
122        unsigned long pd_deadline_nanosecs;
123       };
124           class _0RL_cd_7963219a43724a61_f2000000   : public omniCallDescriptor {
125      public:   inline _0RL_cd_7963219a43724a61_f2000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0):      omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)   {
126         }
127          static const char* const _user_exns[];
128        const char* arg_0;
129        const char* arg_1;
130        const char* arg_2;
131        const CORBA::StructMemberSeq* arg_3;
132        CORBA::ExceptionDef_var result;
133      };
_0RL_lcfn_7963219a43724a61_03000000(omniCallDescriptor * cd,omniServant * svnt)134           static void _0RL_lcfn_7963219a43724a61_03000000(omniCallDescriptor* cd, omniServant* svnt) {
135        _0RL_cd_7963219a43724a61_f2000000* tcd = (_0RL_cd_7963219a43724a61_f2000000*)cd;
136        CORBA::_impl_Container* impl = (CORBA::_impl_Container*) svnt->_ptrToInterface(CORBA::Container::_PD_repoId);
137        tcd->result = impl->create_exception(tcd->arg_0, tcd->arg_1, tcd->arg_2, *tcd->arg_3);
138        }
create_exception(const char * id,const char * name,const char * version,const::CORBA::StructMemberSeq & members)139          CORBA::ExceptionDef_ptr CORBA::_objref_Container::create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members) {
140        _0RL_cd_7963219a43724a61_f2000000 _call_desc(_0RL_lcfn_7963219a43724a61_03000000, "create_exception", 17);
141        }
~StructDef()142          POA_CORBA::StructDef::~StructDef() {
143     }
144